在导入sklearn部分模块时,出现DeprecationWarning(弃用警告),形式如下:
C:\Adaconda2\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 are different from that of this module. This module will be removed in 0.20.
"This module will be removed in 0.20.", DeprecationWarning)C:\Adaconda2\lib\site-packages\sklearn\learning_curve.py:23: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the functions are moved. This module will be removed in 0.20
DeprecationWarning)
基本的意思是cross_validation和learning_curve模块在0.18版本中被弃用了,在0.20版本中已经被model_selection代替。所以早在导入的时候要从sklearn.model_selection进行导入。
被弃用的模块还有下列一些: