如何使用GridSearchCV获得所有模型(每组参数一个)? [英] How to get all the models (one for each set of parameters) using GridSearchCV?
本文介绍了如何使用GridSearchCV获得所有模型(每组参数一个)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
据我了解:
best_estimator _
为评估者提供最高分; best_score _
提供所选估算器的分数; cv_results _
可能被利用来获取所有估计量的分数.
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.
推荐答案
据我所知,您不能.但是,您可以做的是从 best_params _
中获取最佳参数组合,并使用相同的参数再次拟合模型.查看 GridSearchCV
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
这篇关于如何使用GridSearchCV获得所有模型(每组参数一个)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文