簡體   English   中英

AttributeError:模塊“ sklearn.mixture”沒有屬性“ GMM”

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM