Icon

08 Decision Tree Model - Solution

Solution to an exercise for training a decision tree model.

Train, apply, and evaluate a decision tree model.

CHECK YOUR ANSWERS:
The overall accuracy of the model is around 70%.

Exercise: Decision Tree ModelExecute the metanode below. It accesses the demographics, geocoordinates, and travel risk information in differentcountries/territories, and creates a binomial column Travel with two values "Travel safely" and "Travel with care"based on the travel risk information. You task is to predict this travel risk category based on the demographics andgeocoordinates data.1.1) Partition the data into a training set (70%) and a test set (30%). Apply stratified sampling on the Travel column.1.2) Build a decision tree model to predict the travel risk category in the Travel column. Apply the model to the testset.1.3) Evaluate the model's performance with the Scorer (JavaScript) node. What is the overall accuracy of the model? 70/30 splitStratified sampling on theTravel columnPredict TravelEvaluate model accuracy Partitioning DecisionTree Learner Decision TreePredictor Scorer (JavaScript) Data access andpreprocessing Exercise: Decision Tree ModelExecute the metanode below. It accesses the demographics, geocoordinates, and travel risk information in differentcountries/territories, and creates a binomial column Travel with two values "Travel safely" and "Travel with care"based on the travel risk information. You task is to predict this travel risk category based on the demographics andgeocoordinates data.1.1) Partition the data into a training set (70%) and a test set (30%). Apply stratified sampling on the Travel column.1.2) Build a decision tree model to predict the travel risk category in the Travel column. Apply the model to the testset.1.3) Evaluate the model's performance with the Scorer (JavaScript) node. What is the overall accuracy of the model? 70/30 splitStratified sampling on theTravel columnPredict TravelEvaluate model accuracyPartitioning DecisionTree Learner Decision TreePredictor Scorer (JavaScript) Data access andpreprocessing

Nodes

Extensions

Links