在 scikit-learn 0.20 之前我们可以使用result.grid_scores_[result.best_index_]
以获得标准差。 (它返回例如:mean: 0.76172, std: 0.05225, params: {'n_neighbors': 21}
)
scikit-learn 0.20 中获得最佳分数的标准差的最佳方法是什么?
在较新的版本中,grid_scores_
被重命名为cv_results_
。继文档, 你需要这个:
best_index_ : int
The index (of the cv_results_ arrays) which corresponds to the best >
candidate parameter setting.
The dict at search.cv_results_['params'][search.best_index_] gives the >
parameter setting for the best model, that gives the highest mean
score (search.best_score_).
所以在你的情况下,你需要
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)