scikit-learn / scikit-learn/scikit-learn

GMM covariance types examples overly complex / confusing

Open
#10,863 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation help wanted module:mixture
Dominant language
Python
Stars
67.3k
Forks
27.4k
Avg merge
1d 15h
Merged PRs (30d)
58

Description

http://scikit-learn.org/dev/auto_examples/mixture/plot_gmm_covariances.html#sphx-glr-auto-examples-mixture-plot-gmm-covariances-py

I don't particularly like the example because it's supervised and uses a train/test split and identification with the original classes. I think it would be better to use a synthetic dataset and just show off the different covariance types.

It also fits the model on 4d data and only shows a 2d projection and that's not super intuitive imho.

Also, the example could be much simplified if we added a "get_covariance" function back to the model. I think we had that in the old GMM. Was there a reason not to add it to the new GMM? In many cases the user wants to be agnostic to the storage format of the covariance matrix, I think.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked auto_examples/mixture/plot_gmm_covariances.py example and review how the current GMM model stores covariance data. Run the example to understand its supervised train/test flow and 4D-to-2D presentation. Done means the example clearly compares covariance types on a synthetic dataset, with the proposed get_covariance API considered and its behavior documented or tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.