简体   繁体   English

AttributeError:模块“ sklearn.mixture”没有属性“ GMM”

[英]AttributeError: module 'sklearn.mixture' has no attribute 'GMM'

I am attempting to run the following Python project: 我正在尝试运行以下Python项目:

https://github.com/huanghe314/Text-Independent-Speaker-Indentification-System https://github.com/huanghe314/Text-Independent-Speaker-Indentification-System

It depends on sklearn.mixture.GMM , but fails to find that module despite the fact that I have sklearn installed. 这取决于sklearn.mixture.GMM ,但未能找到该模块尽管我已经事实sklearn安装。 The error it gives is as follows: 它给出的错误如下:

Traceback (most recent call last):

File "C:/Users/User/PyCharmApp/Text-Independent-Speaker-Indentification-System-master/Code/main.py", line 85, in <module>
    p_weight[m] = training.Training_feature_Weight(Name[m] + '.wav')


File "C:\Users\User\PyCharmApp\Text-Independent-Speaker-Indentification-System-master\Code\training.py", line 24, in Training_feature_Weight
    Weight_training = Training_info.GMM_Model_Weight()
  File "C:\Users\User\PyCharmApp\Text-Independent-Speaker-Indentification-System-master\Code\GMM.py", line 31, in GMM_Model_Weight
    weight = mixture.GMM(n_components = self.M, min_covar = 0.01, n_init = 10).fit(self.features).weights_

I'm running Python 3.6. 我正在运行Python 3.6。

sklearn.mixture.GMM is no longer available in current versions of sklearn , as per the documentation : sklearn.mixture.GMM是在当前版本中不再sklearn ,按照该文件

Deprecated since version 0.18: This class will be removed in 0.20. 从版本0.18开始不推荐使用:此类将从0.20中移除。 Use sklearn.mixture.GaussianMixture instead. 请改用sklearn.mixture.GaussianMixture

Given that, I believe your options are either to change the code to use GaussianMixture or downgrade your version of sklearn . 鉴于此,我相信您的选择是更改代码以使用GaussianMixture或降级您的sklearn版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AttributeError:'GMM'对象没有属性'covariances_'|| AttributeError:'module'对象没有属性'GaussianMixture' - AttributeError: 'GMM' object has no attribute 'covariances_' || AttributeError: 'module' object has no attribute 'GaussianMixture' ImportError:导入 sklearn.mixture 时无法导入名称选择 - ImportError: cannot import name choice when importing sklearn.mixture AttributeError: 导入 sklearn 库时,模块“numpy”没有属性“testing” - AttributeError: module 'numpy' has no attribute 'testing' when importing sklearn library AttributeError:模块“sklearn”没有属性“model_selection” - AttributeError: module 'sklearn' has no attribute 'model_selection' sklearn余弦相似度:: AttributeError:“模块”对象没有属性“指标” - sklearn cosine similarity :: AttributeError: 'module' object has no attribute 'metrics' AttributeError:模块“sklearn.metrics._dist_metrics”没有属性“DatasetsPair” - AttributeError: module 'sklearn.metrics._dist_metrics' has no attribute 'DatasetsPair' Python sklearn.mixture.GMM规模不稳健? - Python sklearn.mixture.GMM not robust to scale? python中的sklearn mix.GMM使用单变量GMM - sklearn mixture.GMM in python using univariate GMM sklearn.mixture.GMM(高斯混合模型)的问题 - issue with sklearn.mixture.GMM (Gaussian Mixture Model) AttributeError:模块“ sklearn.utils”在继承类“ sklearn.ensemble.BaggingClassifier”时没有属性“ _joblib”。 - AttributeError: module “sklearn.utils” has no attribute “_joblib” when inheriting class `sklearn.ensemble.BaggingClassifier.`
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM