Question: Now we are ready to create a decision tree with all parameters set with default values. You may call your decision tree as tree. Use
Now we are ready to create a decision tree with all parameters set with default values. You may call your decision tree as "tree". Use DecisionTreeClassifier and make sure set randomstate
s
from sklearn.tree import DecisionTreeClassifier
tree DecisionTreeClassifierrandomstate
tree.fitXtrain, ytrain
Then we get the accuracy score on both training set and test set.
Do you think the model has the issue of overfitting? Why?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
