ImportError: cannot import name 'GMM'

报错信息如下

报错原因

较新版本的scikit-learn没有该模块。通过查看版本,它在v 0.18中被弃用,并在v 0.20中删除。

解决方案

from sklearn.mixture import GaussianMixture
替换
from sklearn.mixture import GMM
发布了1192 篇原创文章 · 获赞 332 · 访问量 127万+

猜你喜欢

转载自blog.csdn.net/qq_37591637/article/details/104854939