1
$\begingroup$

I am new to SK-Learn, when i'm evaluating the models, i use clf.score (X_test, y_test) (for a tree model for instance). I'm confused on what this score is. In the past, i was more used to talk about mean square error. I found the link http://scikit-learn.org/stable/modules/model_evaluation.html , but I really couldn't find any clear explanations. Please shine some lights. Many thanks.

$\endgroup$
1
$\begingroup$

According to scikit learn site, for sklearn.tree.DecisionTreeClassifier, it should return the mean accuracy on the given test data and labels.

You can find the corresponding code here. Seems that score methods for classification problem returns accuracy and for regression method, it returns $R^2$.

$\endgroup$
2
  • $\begingroup$ Thanks, is 'Accuracy' same as mean square error? or how exact it's defined? $\endgroup$ – MeiNan Zhu Nov 8 '18 at 3:07
  • $\begingroup$ number of correct prediction divided by number of test data. $\endgroup$ – Siong Thye Goh Nov 8 '18 at 3:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.