Importerror:无法导入名称' _CLASSNAMEPREFIXFEATURESOUTMIXIN'从sklearn.base'

发布于 2025-02-08 21:49:00 字数 299 浏览 2 评论 0原文

我正在努力从sklearn.feature_selection导入 rfecv 。但是我总是有同样的错误。 有人可以帮忙吗? 错误:

ImportError: cannot import name '_ClassNamePrefixFeaturesOutMixin' from 'sklearn.base' (C:\Users\sedam\anaconda34\lib\site-packages\sklearn\base.py)

PS。我的Sklearn的版本是1.0.2。 谢谢。

I am struggling to import RFECV from sklearn.feature_selection. But I always have the same error.
Can anyone help, please?
The error :

ImportError: cannot import name '_ClassNamePrefixFeaturesOutMixin' from 'sklearn.base' (C:\Users\sedam\anaconda34\lib\site-packages\sklearn\base.py)

PS. The version of my SKlearn is 1.0.2.
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一袭水袖舞倾城 2025-02-15 21:49:00

好吧,您正在使用的Python版本或其他软件包的兼容性错误可能存在问题。

对于Windows,恐怕这可能或可能不起作用,都不知道没有使用过。

  1. 。*尝试3.9。
conda install python=3.9 -y ;
conda update conda -y && conda update python -y
  1. 如果您在python 3.10
    我正在用Meow

Well, there might be an issue with the python version you're using or a compatibility error with other packages.

For Windows, I'm afraid this might or mightn't work don't know haven't used it.

  1. If you're on Python 3.10.* try with 3.9.*:
conda install python=3.9 -y ;
conda update conda -y && conda update python -y
  1. Or else you can make a new env named sklearn or whatever:
    I'm creating mine with meow ????
conda create --name meow python=3.9 -y ;
conda activate meow ;
conda install python=3.9 -y ;
conda install numpy pandas matplotlib seaborn scikit-learn ipykernel -y
  1. Or just simple Update conda and python if you are on 3.9.*:
conda update conda -y && conda update python -y
女中豪杰 2025-02-15 21:49:00

解决方案:#conda install -c conda-forge不平衡的年学习

solution : #conda install -c conda-forge imbalanced-learn

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文