regression model evaluation using scikit-learn

江枫思渺然 提交于 2019-12-05 20:13:35
  1. Just like GridSearchCV, RandomizedSearchCV uses the score method on the estimator by default. ExtraTreesRegressor and other regression estimators return the R² score from this method (classifiers return accuracy).

  2. The convention is that a score is something to maximize. Mean squared error is a loss function to minimize, so it's negated inside the search.

And then when I calculate r.score(X,y), it seems reporting R2 again.

That's not pretty. It's arguably a bug.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!