【问题标题】:Unable to import SMOTE due to error <<ImportError: cannot import name 'lobpcg' from 'sklearn.utils.fixes' >>由于错误 <<ImportError: cannot import name 'lobpcg' from 'sklearn.utils.fixes' >> 无法导入 SMOTE
【发布时间】:2020-04-08 04:10:53
【问题描述】:

由于错误无法导入 SMOTE ImportError: cannot import name 'lobpcg' from 'sklearn.utils.fixes' (E:\Installations\lib\site-packages\sklearn\utils\fixes.py)

当我尝试导入下面的包时显示上面的错误

from imblearn.combine          import SMOTETomek

from imblearn                  import under_sampling, over_sampling

from imblearn.over_sampling    import SMOTE

I have conda installed sklearn, imbllearn. Can some one help me to resolve this error

【问题讨论】:

    标签: python scikit-learn sklearn-pandas imblearn


    【解决方案1】:

    这是在 scikit-learn 中引发的错误。

    请务必使用以下方法安装这两个库:

    conda install scikit-learn -c conda-forge 
    conda install imbalanced-learn -c conda-forge
    

    请注意,我正在使用 conda-forge 频道安装 scikit-learn 以获取 0.22 版本,因为目前conda 默认频道上没有最新版本。

    【讨论】:

      猜你喜欢
      • 2021-09-28
      • 2021-09-30
      • 2023-02-07
      • 1970-01-01
      • 2022-08-15
      • 2019-07-20
      • 2020-07-16
      • 2019-06-10
      • 2014-09-25
      相关资源
      最近更新 更多