分享

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

 处女座的程序猿 2021-09-28

成功解决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方法。

    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章