当前位置:网站首页>AttributeError: ‘GridSearchCV‘ object has no attribute ‘grid_scores_‘
AttributeError: ‘GridSearchCV‘ object has no attribute ‘grid_scores_‘
2022-08-08 06:20:00 【波尔德】
刘建平的博客中关于随机森林调参的代码在运行时会出现如下所示的错误:
AttributeError: ‘GridSearchCV’ object has no attribute ‘grid_scores_’
解决方法如下:grid_scores_在sklearn0.20版本中已被删除,取而代之的是cv_results_。
原代码:
print(gsearch1.grid_scores_, gsearch1.best_params_, gsearch1.best_score_)
正确的代码:
print(gsearch1.cv_results_, gsearch1.best_params_, gsearch1.best_score_)
边栏推荐
猜你喜欢
随机推荐
Preprocessing Notes
The tests that need to be done in the development of medical device products
【图像处理】matlab基础图像处理 | 图像载入、图像添加噪声、图像滤波、图像卷积
MySQL6
Sentinel流控规则绑定nacos持久化
【微信小程序】一文学懂小程序的数据绑定和事件绑定
tkinter-TinUI-xml combat (7) PDF paging and merging
gcc/g++ use
数据库系统原理与应用教程(080)—— MySQL 练习题:操作题 186-193(二十四):综合练习
日常bug小结:
C人脸识别
Several postman features worth collecting will help you do more with less!
线上接口流量突增,快要扛不住了
C face recognition
【数学建模】微分方程求解 | dsolve函数 | ode45函数
The pta patching simple graph theory
独立成分分析ICA/FastICA
2-SAT
数字IC设计笔试题汇总(四):一些基础知识点
线程使用、控制、通信








