我尝试在 sklearn
中使用 Batesian 模型,但尝试时出现以下错误。
>>> from sklearn.mixture import BayesianGaussianMixture
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name BayesianGaussianMixture
我使用的是python 2.7.11
。我看到了documentation我检查了拼写是否正确。导入它我该怎么办?
最佳答案
将 scikit-learn 更新至 0.18,位于 previous versions它被称为 VBGMM(变分贝叶斯高斯混合模型) - 实际上它是一种有点不同的方法,但它是您在以前的版本中获得的最接近的方法。
关于python - 导入错误: cannot import name BayesianGaussianMixture,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39987374/