Skip to content

DOC Adds GaussianMixture and BayesianGaussianMixture examples - #15193

Merged
thomasjpfan merged 7 commits into
scikit-learn:masterfrom
darioka:gaussian_mixture_example
May 22, 2020
Merged

thomasjpfan merged 7 commits into
scikit-learn:masterfrom
darioka:gaussian_mixture_example

Conversation

@darioka

@darioka darioka commented Oct 12, 2019

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

#3846

What does this implement/fix? Explain your changes.

Add examples to mixture.GaussianMixture and mixture.BayesianGaussianMixture

Any other comments?

@thomasjpfan thomasjpfan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @darioka for the PR!

Comment thread sklearn/mixture/bayesian_mixture.py Outdated
>>> BGM.means_
array([[5.50000048, 2. ],
[5.49999668, 2. ]])
>>> BGM.predict([[0, 0], [12, 3]])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May you pick another point to give a different result than zero?

Comment thread sklearn/mixture/bayesian_mixture.py Outdated
>>> X = np.array([[1, 2], [1, 4], [1, 0], [4, 2], [12, 4], [10, 7]])
>>> BGM = BayesianGaussianMixture(n_components=2, random_state=42).fit(X)
>>> BGM.means_
array([[2.4975536 , 2.29225365],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use ... just in case there is a floating point error

Suggested change
array([[2.4975536 , 2.29225365],
array([[2.49... , 2.29...],

@darioka

darioka commented Dec 15, 2019

Copy link
Copy Markdown
Contributor Author

Hi, I did not understand why some checks failed. Could you help me on that?

@Malesche Malesche mentioned this pull request Mar 6, 2020
8 of 23 tasks
@cmarmo

cmarmo commented May 22, 2020

Copy link
Copy Markdown
Contributor

Hi @darioka, I know that it has been a while... sorry for that.
If you are still interested in finishing this PR may I ask you to synchronize with scikit-learn master (you can find instructions at that page)? Unfortunately the build log has been deleted. Thanks for your patience!

@darioka

darioka commented May 22, 2020

Copy link
Copy Markdown
Contributor Author

Hi @cmarmo, done! Thank you for your support!

Comment thread sklearn/mixture/_bayesian_mixture.py Resolved
Comment thread sklearn/mixture/_bayesian_mixture.py Resolved
Comment thread sklearn/mixture/_bayesian_mixture.py Resolved
Comment thread sklearn/mixture/_gaussian_mixture.py Resolved
Comment thread sklearn/mixture/_gaussian_mixture.py Resolved
Comment thread sklearn/mixture/_gaussian_mixture.py Resolved

@thomasjpfan thomasjpfan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thank you @darioka !

@thomasjpfan thomasjpfan changed the title DOC add mixture.GaussianMixture and mixture.BayesianGaussianMixture examples DOC Adds GaussianMixture and BayesianGaussianMixture examples May 22, 2020
@thomasjpfan
thomasjpfan merged commit a0a23d2 into scikit-learn:master May 22, 2020
viclafargue pushed a commit to viclafargue/scikit-learn that referenced this pull request Jun 26, 2020
jayzed82 pushed a commit to jayzed82/scikit-learn that referenced this pull request Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants