用于估计最佳调整参数的GridSearchCV
我正在从这些代码的这些行中获取密钥错误:0
grid.cv_results_[0].parameters
print(grid.cv_results_[0].cv_validation_scores)
print(grid.cv_results_[0].mean_validation_scores)
I am getting key error : 0
from these lines of code
grid.cv_results_[0].parameters
print(grid.cv_results_[0].cv_validation_scores)
print(grid.cv_results_[0].mean_validation_scores)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GridSearchCV的CV_Results _
返回字典。因此,您无法通过索引访问它。例如:输出将是:
您可以访问
cv_results _
类似:GridSearchCV's cv_results_
returns a dictionary. Therefore you can't access it via index. For example:Output will be:
You can access
cv_results_
items like: