首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AttributeError:模块“sklearn.mixture”没有属性“GMM”

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

Stack Overflow用户
提问于 2018-12-16 15:44:49
回答 1查看 5.6K关注 0票数 4

我试图运行以下Python项目:

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

它依赖于sklearn.mixture.GMM,但是尽管我已经安装了sklearn,但仍然找不到这个模块。它给出的错误如下:

代码语言:javascript
复制
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_

我正在运行Python3.6。

EN

回答 1

Stack Overflow用户

发布于 2018-12-18 17:30:08

根据sklearn.mixture.GMMsklearn的当前版本不再提供文档

从0.18版本开始被废弃:这个类将在0.20中被删除。使用sklearn.mixture.GaussianMixture代替。

有鉴于此,我相信您的选择是要么更改代码以使用GaussianMixture,要么降级您的sklearn版本。

票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53803775

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档