成功解决sklearn\cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 i

简介: 成功解决sklearn\cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 i

解决问题


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.

 "This module will be removed in 0.20.", DeprecationWarning)



解决思路


拒绝警告:在版本0.18中,此模块已被弃用,取而代之的是将所有重构类和函数移入的模型选择模块。还请注意,新的cv迭代器的接口与此模块的接口不同。此模块将在0.20中删除。“此模块将在0.20中删除。”)



解决方法


cross_validation模块已经被重构,在未来的版本中会被弃用!此信息提示为警告,即使不处理也不会影响代码编程。如果想要去掉,可以更新库至最新版本,然后使用最新版本cross_validation方法。


相关文章
|
算法框架/工具
成功解决INFO: pip is looking at multiple versions of keras-preprocessing to determine which version is c
成功解决INFO: pip is looking at multiple versions of keras-preprocessing to determine which version is c
|
3月前
|
Python
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.0 as it may crash. To support
本文讨论了在NumPy 2.0.0版本更新后可能出现的兼容性问题,并提供了通过降级NumPy版本至1.x的解决方法,以支持尚未更新的模块或库。
AttributeError: module ‘torch.utils‘ has no attribute ‘data‘
属性错误:模块的'torch.utils'没有属性'data'
96 0
|
TensorFlow API 算法框架/工具
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
321 0
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
UserWarning: The gensim.similarities.levenshtein submodule is disabled, because the optional Levensh
UserWarning: The gensim.similarities.levenshtein submodule is disabled, because the optional Levensh
150 0
UserWarning: The gensim.similarities.levenshtein submodule is disabled, because the optional Levensh
|
TensorFlow 算法框架/工具
TF版本升级问题:成功解决AttributeError: module tensorflow has no attribute mul
TF版本升级问题:成功解决AttributeError: module tensorflow has no attribute mul
TF版本升级问题:成功解决AttributeError: module tensorflow has no attribute mul
|
机器学习/深度学习 算法
ImportError: cannot import name ‘cross_validation‘ 解决方法
在学习机器学习分类算法 KNN 时,使用交叉验证时,调用了 cross_validation 函数,导入时报错。
369 0
ImportError: cannot import name ‘cross_validation‘ 解决方法
【yolov5报错】Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from ‘--yolov5-5.0\models\common.py
【yolov5报错】Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from ‘--yolov5-5.0\models\common.py
1119 0