Icon

Ensemble_​Exercise

Ensemble methods

Ensembles: binary classification of house ranking (high/low rank).

- Random forest
- Gradient Boosted Trees
- Training
- Evaluation
- Parameter Optimization


Classification: random forest Exercise: Random Forest & Gradient Boosted Trees1. Train a random forest model (Random Forest Learner) to predict the overall condition of a house (high/low), with thefollowing settings:• Limit tree depth to 15• Limit the minimum node size to 10• The number of trees (i.e. models) to 1002. Examine the output table “Attribute Statistics” generated by the learner node. It lists which features were chosen for thefirst 3 splits in different tree models. Features chosen first are likely informative in classification. Which of the features inthis dataset are very informative? Justify your answer.3. Use the trained model to predict (Random Forest Predictor) the rank of the houses in the test set, and evaluate theaccuracy of the decision tree model (Scorer JavaScript). What is the accuracy of the model?4. Train a gradient boosted trees model to predict the overall condition of a house (high/low), with the following setting:• Limit the tree depth to 4• The number of models to 1005. Use the trained model to predict the rank of the houses in the test set, and evaluate the accuracy of the decision treemodel. What is the accuracy of the model?6. (Optional) Use a parameter optimization loop to find the optimum tree depth to maximize the accuracy (use Scorernode, not Scorer JavaScript). Examine the tree depth of 1 to 10, with the step size of 1. Which tree depth produces theoptimal result? Use Case DescriptionThe dataset we use in this exercise describes the sale of individual residential properties in Ames, Iowa from 2006 to 2010.One of the columns is the overall condition ranking, with values between 1 and 10. The goal of this exercise is to train a binary classification model, which can predict whether the overall condition is high orlow. To do so, the workflow below reads the data set and creates the class column based on overall condition ranking,which is called rank and has the values low if the overall condition is smaller or equal to 5, otherwise high. It is now on you continue this workflow! Classification: Gradient boosted trees Data PreparationThe metanode Preprocessing generates a binary target variable "rank" ("High"or "Low"), eliminates some features, andpartition the data into the training dataset (70%) and the testing dataset (30%) Top: training data (70%)Bottom: testing data (30%)Read AmesHousing.csv Preprocessing CSV Reader Classification: random forest Exercise: Random Forest & Gradient Boosted Trees1. Train a random forest model (Random Forest Learner) to predict the overall condition of a house (high/low), with thefollowing settings:• Limit tree depth to 15• Limit the minimum node size to 10• The number of trees (i.e. models) to 1002. Examine the output table “Attribute Statistics” generated by the learner node. It lists which features were chosen for thefirst 3 splits in different tree models. Features chosen first are likely informative in classification. Which of the features inthis dataset are very informative? Justify your answer.3. Use the trained model to predict (Random Forest Predictor) the rank of the houses in the test set, and evaluate theaccuracy of the decision tree model (Scorer JavaScript). What is the accuracy of the model?4. Train a gradient boosted trees model to predict the overall condition of a house (high/low), with the following setting:• Limit the tree depth to 4• The number of models to 1005. Use the trained model to predict the rank of the houses in the test set, and evaluate the accuracy of the decision treemodel. What is the accuracy of the model?6. (Optional) Use a parameter optimization loop to find the optimum tree depth to maximize the accuracy (use Scorernode, not Scorer JavaScript). Examine the tree depth of 1 to 10, with the step size of 1. Which tree depth produces theoptimal result? Use Case DescriptionThe dataset we use in this exercise describes the sale of individual residential properties in Ames, Iowa from 2006 to 2010.One of the columns is the overall condition ranking, with values between 1 and 10. The goal of this exercise is to train a binary classification model, which can predict whether the overall condition is high orlow. To do so, the workflow below reads the data set and creates the class column based on overall condition ranking,which is called rank and has the values low if the overall condition is smaller or equal to 5, otherwise high. It is now on you continue this workflow! Classification: Gradient boosted trees Data PreparationThe metanode Preprocessing generates a binary target variable "rank" ("High"or "Low"), eliminates some features, andpartition the data into the training dataset (70%) and the testing dataset (30%) Top: training data (70%)Bottom: testing data (30%)Read AmesHousing.csv Preprocessing CSV Reader

Nodes

Extensions

Links