![](/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.