Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC Add link to plot_gmm_pdf.py in GaussianMixture examples #31230

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vivaannanavati123
Copy link

Reference Issues/PRs

Addresses #30621.

What does this implement/fix? Explain your changes.

  • Added link to plot_gmm_pdf.py in GaussianMixture docstring examples to demonstrate density estimation, a key GMM use case missing in API docs.
  • No duplicates found for plot_gmm_pdf.py in API docs.
  • Local doc build confirmed link validity.

Any other comments?

Noticed that plot_roc_crossval.py is already linked in User Guide sections (model_evaluation.rst, cross_validation.rst) and related examples, so I would recommend for it to be checked off.

Thank you for your review!

Vivaan Nanavati added 3 commits April 20, 2025 15:30
Copy link

github-actions bot commented Apr 20, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: a674f57. Link to the linter CI: here

Copy link
Contributor

@StefanieSenger StefanieSenger left a comment

Choose a reason for hiding this comment

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

Hi @vivaannanavati123,

thank you for your contribution. I would suggest a change in phrasing, to express what is special about this example compared to other examples on GaussianMixture.

Maybe move the link inside the docstring of the score_samples method in sklearn/mixture/_base.py, which is displayed both in GaussianMixture as well as in BaysianGaussianMixture, though it might be worth it. What do you think?

Comment on lines +707 to +709
Gaussian Mixture Models are commonly used for probability density estimation and
modeling multi-modal distributions. For a visualization, see
:ref:`sphx_glr_auto_examples_mixture_plot_gmm_pdf.py`
Copy link
Contributor

@StefanieSenger StefanieSenger Apr 28, 2025

Choose a reason for hiding this comment

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

I would suggest to directly describe what the example shows. Maybe like this:

Suggested change
Gaussian Mixture Models are commonly used for probability density estimation and
modeling multi-modal distributions. For a visualization, see
:ref:`sphx_glr_auto_examples_mixture_plot_gmm_pdf.py`
For an illustration of the negative log-likelihood surface of a
:class:`~sklearn.mixture.GaussianMixture` Model,
see :ref:`sphx_glr_auto_examples_mixture_plot_gmm_pdf.py`.

@StefanieSenger
Copy link
Contributor

Hi @vivaannanavati123, are you still interested in working on that?

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.

2 participants