BER NA
BER NA

Reputation: 51

AttributeError: module 'sklearn.mixture' has no attribute 'GMM'

I am attempting to run the following Python project:

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. 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.

Upvotes: 4

Views: 6364

Answers (1)

cody
cody

Reputation: 11157

sklearn.mixture.GMM is no longer available in current versions of sklearn, as per the documentation:

Deprecated since version 0.18: This class will be removed in 0.20. Use sklearn.mixture.GaussianMixture instead.

Given that, I believe your options are either to change the code to use GaussianMixture or downgrade your version of sklearn.

Upvotes: 8

Related Questions