sklearn.* 模块在 0.22 版中已弃用,并将在 0.24 版中删除 [英] The sklearn.* module is deprecated in version 0.22 and will be removed in version 0.24

查看:230
本文介绍了sklearn.* 模块在 0.22 版中已弃用,并将在 0.24 版中删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将一个软件从 Python 2.7 迁移到 Python 3.

I am migrating a piece of software from Python 2.7 to Python 3.

出现的一个问题是:

sklearn.neighbors.kde 模块在 0.22 版本中被弃用,并且将在 0.24 版本中移除.对应的类/函数应该从 sklearn.neighbors 导入.任何不能从 sklearn.neighbors 导入现在是私有的一部分API.

The sklearn.neighbors.kde module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.neighbors. Anything that cannot be imported from sklearn.neighbors is now part of the private API.

我不确定是哪一行导致了这种情况,也不确定是错误还是警告,以及有什么影响.

I am not sure which line causes this, and not sure if it is an error or a warning, and what are the implications.

在 python 2.7 上一切正常.

On python 2.7 everything works fine.

我该如何摆脱这种情况?

How do I get rid of this?

推荐答案

它会一直工作,直到你更新你的 scikit/sklearn 版本.那么内核密度包将不再运行.如果您想更新您的版本,您还有时间搜索类似的模块.

It will work until you update your scikit/sklearn version. Then the Kernel Density package will not run any more. You still have time to search for similar modules if you want to update your version.

但是你也可以设置不同版本的不同环境.因此,如果您需要此模块,只需启动一个环境,不要在此环境中升级您的 sklearn 版本.

But you can also set up different environments with different versions. Thus, if you need this module just start an environment and don't upgrade your sklearn version in this environment.

这篇关于sklearn.* 模块在 0.22 版中已弃用,并将在 0.24 版中删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆