使用scikit-learn 0.18中的警告
来源:互联网 发布:空性智慧知乎 编辑:程序博客网 时间:2024/06/03 23:49
环境:scikit-learn 0.18 , python3
from sklearn.cross_validation import train_test_split
from sklearn.grid_search import GridSearchCV
报出如下警告:
from sklearn.grid_search import GridSearchCV
/usr/lib/python3.4/site-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
“This module will be removed in 0.20.”, DeprecationWarning)
/usr/lib/python3.4/site-packages/sklearn/grid_search.py:43: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. This module will be removed in 0.20.
DeprecationWarning)from sklearn.cross_validation import train_test_split
/usr/lib/python3.4/site-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
“This module will be removed in 0.20.”, DeprecationWarning)
解决方法:
该模块在0.18版本中被弃用,支持所有重构的类和函数都被移动到的model_selection模块
from sklearn.model_selection import GridSearchCV
from sklearn.model_selection import train_test_split
警告
DeprecationWarning)
/usr/lib/python3.4/site-packages/sklearn/utils/validation.py:395: DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and will raise ValueError in 0.19. Reshape your data either using X.reshape(-1, 1) if your data has a single feature or X.reshape(1, -1) if it contains a single sample.
解决方法
clf.predict([]) 规范输入
- 使用scikit-learn 0.18中的警告
- scikit-learn中的SVM
- scikit -learn 的使用
- Scikit-Learn使用总结
- 初步使用scikit-learn
- Scikit-learn使用总结
- Scikit-learn使用总结
- Scikit-learn使用总结
- Scikit-learn使用总结
- Scikit-learn使用总结
- scikit-learn使用总结
- Scikit-learn使用总结
- Scikit-learn使用总结
- scikit-learn中的SVM使用指南
- Scikit-Learn的基本使用
- Scikit-Learn库使用(1)
- 7.scikit-learn基础使用
- scikit-learn基础使用之一
- hdu 2955 Robberies 01背包
- OSG概述
- [KD 树]HDU 5992 Finding Hotels
- 1020. 月饼 (25)
- 关于C#串口通讯问题!
- 使用scikit-learn 0.18中的警告
- 机器学习资源大全
- codevs 1138 聪明的质监员
- 子进程的异步等待方式
- Linux下配置SFTP服务器
- Git 三大区域的操作分析
- 嵌入式软件分层
- Hibernate——懒加载解析
- 自定义带倒影效果的TextView