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.
1 Answer
$\begingroup$
$\endgroup$
2
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$.
-
$\begingroup$ Thanks, is 'Accuracy' same as mean square error? or how exact it's defined? $\endgroup$ Commented Nov 8, 2018 at 3:07
-
$\begingroup$ number of correct prediction divided by number of test data. $\endgroup$ Commented Nov 8, 2018 at 3:08