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

[EXP] Reinitialization #11

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

Conversation

AlexanderFabisch
Copy link
Owner

@AlexanderFabisch AlexanderFabisch commented May 27, 2020

Fitting time-indexed trajectories with GMMs is very difficult without reasonable restart strategies. With this improvement it is possible to fit the following trajectories:

Figure_1

The time variable is not visible but it is proportional to x_1. Each of the 200 lines corresponds to a trajectory of 100 steps. We fit a GMM with 200 x 100 samples. Each sample consists of (t, x_1, x_2). Ellipses correspond to individual Gaussians projected to (x_1, x_2)-axes. Dots are samples from GMMs conditioned on t.

Here is a direct comparison between GMMs learned with intelligent resets (left) and without (right) for 30 Gaussians:

A comparison between GMM with reinitialization (left) and Dirichlet process GMM from sklearn (right):

Conclusion

  • Bayesian GMMs work better than restart strategies for this problem.
    • Add an example
    • Document this in readme
  • Make a new PR, extract the following from this one:
    • regularization for covariance should be a parameter
    • Example
    • k-means++ refactoring
    • GMM.to_mvn()
    • Small fixes for examples
    • Docstring improvements
    • Better code documentation

@AlexanderFabisch AlexanderFabisch changed the title [WIP] Reinitialization [EXP] Reinitialization Jun 2, 2020
n_components = 10
initial_means = kmeansplusplus_initialization(X_train, n_components, random_state)
initial_covs = covariance_initialization(X_train, n_components)
from sklearn.mixture import BayesianGaussianMixture
Copy link
Owner Author

Choose a reason for hiding this comment

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

This is more effective than reinitialization.

@AlexanderFabisch AlexanderFabisch removed their assignment Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant