sklearn的弃用警告 [英] Deprecation warnings from sklearn
本文介绍了sklearn的弃用警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用sklearn中的 cross_validation
,
I am using cross_validation
from sklearn,
from sklearn.cross_validation import train_test_split
我收到以下警告:
cross_validation.py:44:DeprecationWarning:版本0.18中不推荐使用该模块
,而支持model_selection模块,所有重构后的类和函数都移入了
。
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.
推荐答案
问题:
弃用警告表示该模块已弃用,即不再受支持。您正在使用的版本不再是sklearn.cross_validation不再是模块。
The deprecation warning means that the module is deprecated, i.e. no longer supported. You are using a version for which sklearn.cross_validation is not a module any longer.
解决方案:
from sklearn.model_selection import train_test_split
C / O:这篇文章。
这篇关于sklearn的弃用警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文