Question: . ( 8 points ) Train a decision tree model based on the data: a . The features are Weather , Just Ate , and

.(8 points) Train a decision tree model based on the data:
a. The features are Weather,Just Ate, and Work Late.
b. The target is Will Exercise?
c. The decision tree will predict whether the person will go out for exercise based on the
features.
d. The Scikit-Learn Decision Tree model can only take numerical data, so you will need
to use one-hot encoding to convert the original data to zero and one.
e. Train the model with Gini impurity measurement
f. Dont limit the maximum depth of the tree.
4.(2 points) Display the decision tree.
5.(1 point) Display the prediction result with the following input:
Weather: Sunny
Just Ate: yes
Work Late: yes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!