![](/img/trans.png)
[英]AttributeError: 'GMM' object has no attribute 'covariances_' || AttributeError: 'module' object has no attribute 'GaussianMixture'
[英]AttributeError: module 'sklearn.mixture' has no attribute 'GMM'
我正在尝试运行以下Python项目:
https://github.com/huanghe314/Text-Independent-Speaker-Indentification-System
这取决于sklearn.mixture.GMM
,但未能找到该模块尽管我已经事实sklearn
安装。 它给出的错误如下:
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_
我正在运行Python 3.6。
sklearn.mixture.GMM
是在当前版本中不再sklearn
,按照该文件 :
从版本0.18开始不推荐使用:此类将从0.20中移除。 请改用
sklearn.mixture.GaussianMixture
。
鉴于此,我相信您的选择是更改代码以使用GaussianMixture
或降级您的sklearn
版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.