Question: For Decision Tree: ( 3 points ) Based on the output from tree _ clf . predict _ proba and tree _ clf . predict,

For Decision Tree:
(3 points) Based on the output from tree_clf.predict_proba and tree_clf.predict, explain the predicting results. (How do you decide which category an instance belongs to?)
(3 points) Were the predictions for these instances correct? Why?
(3 points) Modify the DecisionTreeClassifier model with the following hyperparameter settings:
maximum depth: 3
measure with "entropy" instead of "Gini impurity"
For Random Forest:
(2 points) Split the original dataset into training set (75%) and test set (25%).
(2 points) Train the random forest with the training set.
(2 points) Apply the trained classifier to the test data.
(2 points) Predict the category of the following instance (print out the category name):
sepal length =6.1, sepal width =2.6, petal length =1.5, petal width =0.2
(2 points) Print the score and the confusion matrix of the classifier.
Note: You can directly update the code for coding questions. You need to answer the remaining questions in a Markdown field.
(1 points) Create a new Markdown field at the end of this file and put your answers in this field. Submit this file to the Blackboard.

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!