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 random_state =0.
[16]
0s
from sklearn.tree import DecisionTreeClassifier
tree = DecisionTreeClassifier(random_state=0)
tree.fit(X_train, y_train)
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 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!