![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
机器学习
小三体Sanity
北京航空航天大学在读
展开
-
pca = PCA(n_components=117, whiten=True, random_state=42)中random_state参数作用
参考https://stackoverflow.com/questions/48471632/sklearn-pca-random-state-parameter-functionSklearn库给PCA方法添加了一个新的参数random_state,如下链接http://scikit-learn.org/stable/modules/generated/sklearn.decompos...原创 2020-02-16 20:25:18 · 2223 阅读 · 0 评论 -
'GridSearchCV' object has no attribute 'best_params_'解决办法
from sklearn.model_selection import GridSearchCV用SVM做了一个蘑菇有毒无毒判断模型,调参遇到此问题,原因是忘记fit了。grid = GridSearchCV(model,param_grid)grid.fit(Xtrain, ytrain)print(grid.best_params_)...原创 2020-02-16 19:08:05 · 11213 阅读 · 4 评论