Question: Suppose you have trained a decision tree model called ' dt ' in Python using sklearn.tree.DecisionTreeClassifier. Which of the following codes CAN be used to

Suppose you have trained a decision tree model called 'dt' in Python using sklearn.tree.DecisionTreeClassifier. Which of the following codes CAN be used to generate the testing accuracy of the decision tree 'dt'? The testing dataset (features) is X test', and the true testing label is
'Y_test'.
a) from sklearn.metrics import accuracy_score
accuracy_score(y_test, X_test)
b) dt.score(X_test)
c) from sklearn.metrics import accuracy_score accuracy_scorely_test, dt.predict(X_test)
d) dt.accuracy(X_test, y_test)

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 Databases Questions!