sklearn.learning_curve 导入 validation_curve 0.18版本废弃警告及解决方法

D:\ProgramData\Anaconda3\lib\site-packages\sklearn\cross_validation.py:41: 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.

主要意思 :  主要意思是说在0.18版本中,cross_validation被废弃了,在 0.20版本中,将被删除

解决办法:

 from sklearn.learning_curve import validation_curve 修改为: from sklearn.model_selection import validation_curve

即 从  model_selection 中导入  validation_curve 模块

扫描二维码关注公众号,回复: 3242489 查看本文章

猜你喜欢

转载自blog.csdn.net/xrinosvip/article/details/81843748