2017-07-10 56 views
1

请你能帮我解决这个问题吗?蟒蛇机器学习DeprecationWarning

C:\ Python27 \ lib \ site-packages \ sklearn \ cross_validation.py:44:DeprecationWarning:该模块在版本0.18中被弃用,以支持将所有重构类和函数移入其中的model_selection模块。另外请注意,新的CV迭代器的接口与此模块的接口不同。该模块将在0.20中删除。 “该模块将在0.20被除去。”,DeprecationWarning)

+0

请[发短信,不要截图](http://meta.stackoverflow.com/a/285557/3005167),即使它对您很方便:) – kazemakase

+0

谢谢,这是我可以' t解决它C:\ Python27 \ lib \ site-packages \ sklearn \ cross_validation.py:44:DeprecationWarning:该模块在版本0.18中被弃用,倾向于model_selection模块,所有重构的类和函数都被移入其中。还要注意,新的CV迭代器的接口与本模块的接口不同。该模块将在0.20中删除。 “DeprecationWarning) – javac

回答

4

C:\Python27\lib\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 is different from that of this module. This module will be removed in 0.20. "This module will be removed in 0.20.", DeprecationWarning)

只是一个弃用警告


没有必要担心,但是请记住,cross_val将在0.20被删除。

这个错误只是为了警告你,开发人员在他们做这件事之前要把它移动。


只是一个example.In的将来,我们将不得不更换:

from sklearn.cross_validation import KFold 

有:

from sklearn.model_selection import KFold 

对于第二个错误,我可以看到在您发布的截图,SA3L module似乎没有安装。

+2

谢谢#Sera是我知道这是警告,我用warnings.filterwarnings(”忽略“),但它仍然可用,但任何方式,谢谢我会忽略它,是的,关于我的错误我想我没有导入这个类谢谢 – javac

+0

@javac换句话说,他们会把cross_validation下的类放到model_selection中。 – sera

+0

是的,这是正确的我刚刚在scikit学习网站上看到这个问题。谢谢 – javac