Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGaussian Mixture Model_Generalizing E–M example Tip (scikit-learn version issue) #164
Comments
|
Duplicate with #71 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are using the latest version of scikit
From Scikit-Learn 0.18.2 version changed the class name GMM -> GaussianMixture
and your E-M example( in[7] example code ) should be changed code like this
from sklearn.mixture import GMMgmm = GMM(n_components=4).fit(X)labels = gmm.predict(X)plt.scatter(X[:, 0], X[:, 1], c=labels, s=40, cmap='viridis');↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
from sklearn.mixture import GaussianMixturegmm = GaussianMixture(n_components=4).fit(X)labels = gmm.predict(X)plt.scatter(X[:, 0], X[:, 1], c=labels, s=40, cmap='viridis');