You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Gaussian mixtures, when n_init is set to any value greater than 1, the lower_bound_ is not the max lower bound across all initializations, but just the lower bound of the last initialization.
The bug can be fixed by adding the following line just before return self in BaseMixture.fit():
self.lower_bound_=max_lower_bound
The test that should have caught this bug is test_init() in mixture/tests/test_gaussian_mixture.py, but it just does a single test, so it had a 50% chance of missing the issue. It should be updated to try many random states.
…ls when n_init > 1 (#10870)
* Set lower_bound_ to max lower bound at the end of BaseMixture.fit(), fixes#10869
* Use a local lower_bound variable rather than self.lower_bound_ during training, in BaseMixture.fit()
* Remove extra empty line
* Update documentation and reduce test_init() iterations from 100 to 25
* Update whats_new/v0.20.rst to add mention of issue 10869, and reformat file to fit on 80 columns
* Remove extra line in whats_new/v0.20.rst
* Add tests for convergence detection in Gaussian mixtures when warm_start=True
* Remove unnecessary catch_exception blocks
* Fix tests since n_iter_ was recently fixed to be increased by 1
* Revert changes unrelated to PR 10870 in doc/whats_new/v0.20.rst
* Replace assert_* with plain asserts because of the move to pytest
* Remove comment in whats_new/v0.20.rst that will be added upon merging
* Replace single backticks with double backticks in doc string
* Limit is 79 characters per line, not 80.
* Remove the false convergence fix to treat it in a separate PR
Description
In Gaussian mixtures, when
n_init
is set to any value greater than 1, thelower_bound_
is not the max lower bound across all initializations, but just the lower bound of the last initialization.The bug can be fixed by adding the following line just before
return self
inBaseMixture.fit()
:The test that should have caught this bug is
test_init()
inmixture/tests/test_gaussian_mixture.py
, but it just does a single test, so it had a 50% chance of missing the issue. It should be updated to try many random states.Steps/Code to Reproduce
Expected Results
No error.
Actual Results
Versions
The text was updated successfully, but these errors were encountered: