python - 导入错误: cannot import name BayesianGaussianMixture

标签 python machine-learning scikit-learn cluster-analysis

我尝试在 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/

相关文章:

python-2.7 - 如何在python虚拟环境中导入scikit-learn?

python - 带装袋分类器的逻辑回归中的特征重要性

c++ - Boost 和 Python 3.x

python - 为什么 "if not (a and b)"比 "if not a or not b"快?

numpy - 数据集中模式的随机化

r - 使用日志来向量化重复乘法是正确的方法吗?

python - 使用 raw_input 接受函数值

python - 属性错误 : SubRequest instance has no attribute 'param'

r - 如何将R中的多列保存为csv文件?

python - 在 scikit-learn 中的数据集上绘制决策树