How to get all the models (one for each set of parameters) using GridSearchCV?

拜拜、爱过 提交于 2021-01-27 15:11:25

问题


From my understanding:

best_estimator_ provides the estimator with highest score; best_score_ provides the score of the selected estimator; cv_results_ may be exploited to get the scores of all estimators.

However, it is not clear to me how to get the estimators themselves.


回答1:


As I see it, you cannot. But what you can do is taking the best parameter combination from best_params_ and fit the model again with those same parameters. Check out attributes of GridSearchCV



来源:https://stackoverflow.com/questions/52774769/how-to-get-all-the-models-one-for-each-set-of-parameters-using-gridsearchcv

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