Skip to content

DOC Adds GaussianMixture and BayesianGaussianMixture examples#15193

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

DOC Adds GaussianMixture and BayesianGaussianMixture examples#15193
thomasjpfan merged 7 commits intoscikit-learn:masterfrom
darioka:gaussian_mixture_example

Conversation

@darioka
Copy link
Copy Markdown
Contributor

@darioka darioka commented Oct 12, 2019

Reference Issues/PRs

#3846

What does this implement/fix? Explain your changes.

Add examples to mixture.GaussianMixture and mixture.BayesianGaussianMixture

Any other comments?

Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan left a comment

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!

>>> 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?

>>> 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
Copy link
Copy Markdown
Contributor Author

darioka commented Dec 15, 2019

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

@Malesche Malesche mentioned this pull request Mar 6, 2020
23 tasks
@cmarmo
Copy link
Copy Markdown
Contributor

cmarmo commented May 22, 2020

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
Copy link
Copy Markdown
Contributor Author

darioka commented May 22, 2020

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

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan left a comment

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