'GridSearchCV' object has no attribute 'best_params_'解决办法
程序员文章站
2022-03-06 21:23:58
...
from sklearn.model_selection import GridSearchCV
用SVM做了一个蘑菇有毒无毒判断模型,调参遇到此问题,原因是忘记fit了。
grid = GridSearchCV(model,param_grid)
grid.fit(Xtrain, ytrain)
print(grid.best_params_)
上一篇: TIDB 优化--TiKV 性能参数调优
下一篇: 关于dropout看我这篇就够了
推荐阅读
-
AttributeError: 'module' object has no attribute 'main'
-
解决Keras报错AttributeError: 'NoneType' object has no attribute 'inbound_nodes'
-
解决'DataFrame' object has no attribute 'sort'
-
‘MyObject‘ object has no attribute ‘***‘
-
AttributeError: ‘NoneType‘ object has no attribute ‘origin‘解决办法
-
AttributeError: ‘set‘ object has no attribute ‘append‘解决办法
-
解决:'Tensor' object has no attribute 'numpy'
-
str‘ object has no attribute ‘decode‘解决办法
-
'module' object has no attribute
-
AttributeError: 'GridSearchCV' object has no attribute 'grid_scores_'