Icon

08 Parameter Optimization - Solution

Solution to an exercise for building a parameter optimization loop.

Optimize the number of trees in a Random Forest model with a parameter optimization loop

CHECK YOUR ANSWERS:
The optimal number of trees is 80

Exercise: Parameter Optimization LoopOptimize the number of trees in a Random Forest model.1.1) Start with a Parameter Optimization Loop Start node. Create a parameter for the number of treeswith start value=50, end value=150, and increment=10. It is an integer.1.2) Overwrite the number of models setting in the Random Forest Learner (Regression) node with thisparameter1.3) Transform the numeric scoring metrics into flow variables. Use the Table Column to Variable node.1.4) End with a Parameter Optimization Loop End node. Use MAPE as the objective value. What is theoptimal number of trees? Read AB_NYC_2019dataPredict priceR2 and error metricsControlnr of modelsMinimize MAPEInteractiveData Cleaning CSV Reader Random Forest Learner(Regression) Random Forest Predictor(Regression) Numeric Scorer Parameter OptimizationLoop Start ParameterOptimization Loop End Partitioning Replace 0 price byneighborhood average Table Columnto Variable Exercise: Parameter Optimization LoopOptimize the number of trees in a Random Forest model.1.1) Start with a Parameter Optimization Loop Start node. Create a parameter for the number of treeswith start value=50, end value=150, and increment=10. It is an integer.1.2) Overwrite the number of models setting in the Random Forest Learner (Regression) node with thisparameter1.3) Transform the numeric scoring metrics into flow variables. Use the Table Column to Variable node.1.4) End with a Parameter Optimization Loop End node. Use MAPE as the objective value. What is theoptimal number of trees? Read AB_NYC_2019dataPredict priceR2 and error metricsControlnr of modelsMinimize MAPEInteractiveData Cleaning CSV Reader Random Forest Learner(Regression) Random Forest Predictor(Regression) Numeric Scorer Parameter OptimizationLoop Start ParameterOptimization Loop End Partitioning Replace 0 price byneighborhood average Table Columnto Variable

Nodes

Extensions

Links