Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gaussianmixture #288

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Gaussianmixture #288

wants to merge 2 commits into from

Conversation

artkuo
Copy link

@artkuo artkuo commented Oct 21, 2020

This allows notebook to run on scikit-learn 0.18+. The calling convention has changed since that release, with name GaussianMixture instead of old GMM. Parameter covariances_ instead of covars_, random_state can only be assigned to model, not the sample, and sample now returns a tuple of which the 0th element is the desired array of samples. Also fixed a deprecation warning about make_blobs which is now to be imported directly from sklearn.datasets instead of deprecated samples_generator. I've tested this on my Anaconda install (Python-3.8.5, scikit-learn-0.23.2) and on colab. (Thanks for producing this fantastic book and this demo!)

sklearn.mixture.gmm became GaussianMixture in scikit-learn 0.18. Some parameters have changed names. This commit updates notebook to work with these changes. Tested in both anaconda python and colab.
sklearn 0.18 deprecation, import make_blobs from sklearn.datasets directly. This fixes the "future" warning regarding the deprecation.
@patel-zeel
Copy link

Hi @jakevdp,

I think this PR will be helpful if merged. I recently encountered the problems resolved by this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants