Commit Graph

104 Commits

Author SHA1 Message Date
Thomas J. Fan d4aad64b1e
MNT Update to black 22.3.0 to resolve click error (#22983)
* MNT Update to black 22.3.0 to resolve click error

* STY Update for new black version
2022-03-29 12:04:41 +02:00
Thomas J. Fan 1fc86b6aac
MNT Update black to stable version (#22474) 2022-02-15 11:36:26 +01:00
Guillaume Lemaitre 3e460e8b7e
FIX correctly initialize precisions_cholesky_ in GaussianMixture (#22058) 2021-12-22 20:10:22 +01:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Thomas J. Fan 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
tliu68 88be3c1357
Fix GaussianMixture UnboundLocalError (#20030) 2021-05-25 08:23:07 +02:00
Alihan Zihna d852aa0825
TST Changes assert to pytest style in /mixture/tests (#19983)
Co-authored-by: Alihan Zihna <a.zihna@ckhgbdp.onmicrosoft.com>
2021-04-26 11:55:17 -04:00
Thomas J. Fan cf296c74ba
ENH Checks n_features_in_ after fitting in mixture (#19540) 2021-03-23 14:08:11 +01:00
Thomas J. Fan 7cc0177f8e
MNT Replaces numpy alias with builtin typse (#17687)
* MNT Replaces numpy alias with builtin typse

* STY Lint error
2020-06-24 16:51:51 +02:00
Roman Feldbauer 9b39c4c4d2
TST Fix unreachable code in tests (#16110) 2020-02-16 14:41:26 +01:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00
Thomas J Fan 4a95e33e63 MNT Make modules private in sklearn.datasets (#15307) 2019-10-27 17:17:23 -04:00
Nicolas Hug 0f157e9475 ENH Minor update to error message from check_is_fitted (#15357) 2019-10-27 13:06:34 +01:00
Nicolas Hug 6ac9dc4878 MNT make the modules in sklearn.mixture private (#15166)
* renaming

* renamed some imports

* added test and gitignore
2019-10-16 19:16:26 +02:00
Adrin Jalali 19c068a2ec MNT towards removing assert_equal, etc (#14222) 2019-07-01 09:13:32 -04:00
Roman Yurchak 5674122c97 MAINT More test runtime optimizations (#14136)
* Feature extraction / feature selection

* Metrics, manifold, impute, GP optimization

* Optimize mixture

* Optimize model_selection

* Fix tests

* Lint
2019-06-22 10:44:06 +03:00
jeremiedbb 3a47124205 [MRG] Fix GaussianMixture fit_predict != fit.predict when n_init > 1 (#13142) 2019-02-25 07:57:35 +01:00
Roman Yurchak 0e3bb17e62 MAINT Run pyupgrade following Python2 deprecation (#12997) 2019-02-08 20:13:34 +08:00
Kossori Aruku c2d56a6c8f DOC change from 'means_prior' to 'mean_prior' in BayesianGaussianMixture (#13090) 2019-02-04 23:07:29 +08:00
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02:00
Hanmin Qin bfc4a56642 MNT Duplicate import 2018-11-14 20:34:40 +08:00
Hanmin Qin 43e3a02085
MNT Remove unused assert_true imports (#12560) 2018-11-11 11:08:37 +08:00
Yaroslav Halchenko 362cb3bcab TST autoreplace assert_true(...==...) with plain assert (#12547) 2018-11-11 09:05:34 +08:00
Olivier Grisel 036dfdde21 Fix inconsistent labels returned by BayesianGaussianMixture.fit_predict (#12451) 2018-11-04 00:56:50 +11:00
jeremiedbb e50fc2af94 TST Fix test gaussian mixture warm start (#12452) 2018-10-25 13:58:22 +02:00
Oleksandr Pavlyk 63e5ae6319 TST Use same random seeds for both GaussianMixture.fit (#12307) 2018-10-07 11:13:32 +02:00
ZJ Poh adddf00433 [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
Aurélien Geron beb2aa0395 [MRG+1] Fix lower_bound_ not equal to max lower bound in mixture models 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
2018-07-16 14:47:07 +02:00
Shu Haoran c303ed8ef2 ENH adding fit_predict to mixture models (#11281)
Fixes #10336
2018-07-03 12:43:26 +10:00
Andreas Mueller eec7649236 MAINT Complete 0.20 deprecations (#9570) 2018-06-24 23:06:26 +10:00
Roman Yurchak e8d8b8eeb0 TST: parametrize unit tests (#11074)
yield tests are deprecated in pytest and will be removed in pytest 4.0.
They all have been replaced by parametrize.
2018-06-08 14:59:33 +02:00
Guillaume Lemaitre a38067093f [MRG+1] FIX make n_iter_ being the number of iteration performed (#11015)
*
2018-04-24 07:24:53 +10:00
Joan Massich 76494a1462 [MRG+1] Remove hard dependency on nose (#9670) 2017-09-10 13:21:40 +10:00
Taehoon Lee d69395f4fb DOC Fix typos (#9229) 2017-06-27 11:58:46 +10:00
Quentin Hibon f548128e83 Fix typo in BaseMixture warning (#8616) 2017-03-22 16:32:43 +01:00
Kai 379f54be68 [MRG+2] DOC correct docstring for sample_gaussian (#6957)
* DOC correct docstring for sample_gaussian

Docstring did not match function behaviour. Caused some trouble trying to implement a compatible version for a different distribution.

* MAINT Use _sample_gaussian internally

This avoids triggering the deprecation warning. sample_gaussian is just a thin
wrapper.

* Fix _sample_gaussian test path

_sample_gaussian is not publicly exported in mixture, so use gmm module.
2016-10-26 16:27:15 +02:00
Loïc Estève 4e1c101892 Use n_components=3 to test actual regression
n_components and n_features were equal and one was used for the other in
some places.
2016-10-20 16:56:38 +02:00
ljwolf 55672f91b2 add shape assertions to test 2016-10-19 21:53:42 -07:00
Konstantin Podshumok 9b2aac9e5c [MRG + 1] [TST] (half-cosmetic) use less nose.tools import to simplify future transition to py.test (#7384)
* use less nose.tools import to simplify future transition to activly developing test suites/runners

* assert_equal -> assert_array_equal in test_feature_hasher_pairs_with_string_values

and one missed ImportError that should be replaced with AttributeError

* test for py2.6 compat with except AttributeError

* fix importing of SkipTest

* force using nose in python2.6 for now

* there was no assert_dict_equal in py2.6. but we can use assert_equal

although failed test will look a little bit ugly

* remove nose imports from doc/datasets
2016-10-07 12:46:52 -04:00
Olivier Grisel a86fd7f5e7 Add Dirichlet process prior to BayesianGaussianMixture (#7386) 2016-09-10 15:41:52 +02:00
Thierry Guillemot f0862f7af3 [MRG+1] Bayesian Gaussian Mixture (Integration of GSoC2015 -- second step) (#6651)
* Add the new BayesianGaussianMixture class.
Add the test file for the BayesianGaussianMixture.

* Add the use of the cholesky decomposition of the precision matrix.

* Fix some bugs.

* Modification of GaussianMixture class.

The purpose here is to prepare the integration of BayesianGaussianMixture.

* Fix comments.

* Modification of the Docstring.

* Add license and author.

* Fix pb typo of eq 10.64 and 10.62.

* Correct VBGMM bugs.

* Fix full version.

* Fix the precision normalisation pb.

* Fix all cov_type algo for BayesianGaussianMixture.

* Optimisation of spherical and diag computation.

* Code simplification.

* Check the Gaussian Mixture tests are ok.

* Add test.

* Add new tests for BayesianGaussianMixture and GaussianMixture.

* Add the bayesian_gaussian_example and the doc.

* Fix comments.

* Fix review comments and add license and author.

* Fix test compare covar type.

* Fix reviews.

* Fix tests.

* Fix review comments.

* Correct reviews.

* Fix travis pb.

* Fix circleci pb.

* Fix review comments.

* Fix typo.

* Fix comments.

Add reg_covar and what's new.

* Fix comments.

* Fix comments.

* [ci skip] Correct legend.
2016-08-30 19:02:30 +02:00
Andreas Mueller dcb31654aa TST remove print statement in gmm test, remove verbosity in mlp test. 2016-08-27 16:59:57 +02:00
Thierry Guillemot 65b7d7a891 [MRG+2] Modification of GaussianMixture class. (#7123)
* Modification of GaussianMixture class.

The purpose here is to prepare the integration of BayesianGaussianMixture.

* Fix comments.

* Modification of the Docstring.

* Add license and author.

* Fix review and add tests for init.
2016-08-10 09:03:47 +02:00
Thierry Guillemot 4f71f3bda6 [MRG+1] Dpgmm alpha (#7028)
* BF: not mutating alpha in VBGMM, using alpha_ instead

* Correct alpha_.
2016-08-08 15:10:36 +02:00
Thierry Guillemot 05dfe6cc42 Correct Deprecation of DPGMM and VBGMM. (#7124) 2016-08-06 11:28:58 +02:00
James Fiedler e4b837cc66 Removed unused imports 2016-07-29 19:30:23 -05:00
juliathebrave 1a8ddbede3 [MRG +1] adds DeprecationWarning to DPGMM and VBGMM (#7020)
* added Deprecation Warnings to DPGMM and VBGMM classes and other functions

* modified/added functions test_digamma, test_gammaln, test_log_normalize to check for DeprecationWarning

* added functions to test for Deprecated Warnings for wishart_log_det, wishart_logz

* updated test_log_normalize function

* fixed spelling in DeprecationWarning for class DPGMM and
added DeprecationWarning tests test_DPGMM_deprecation, test_VBGMM_deprecation

* added blank lines near inserted DeprecatedWarnings to conform to pep8

* added blank lines and deleted trailing whitespace for pep8

* removed 'import warnings' since not used

* changed wording of DeprecationWarnings for style and/or recommend alternate functions

* fixed spelling error in warning for gammaln

* suppress DecprecationWarnings for two functions

* fixed ignore_warnings function usage

* added more @ignore_warnings(DeprecationWarning)

* temporary commit to check nosetests on travis

* TST suppresses more DeprecatedWarnings

addresses GH6998 VBGMM and DPGMM deprecation

* CLN fixes whitespace for pep8

in test_gmm.py and test_dpgmm.py
for GH6998

* TST uncommented some code

I had commented some code for debugging purposes and had forgotten
to uncomment it. Now it is uncommented again.
2016-07-17 15:48:28 -05:00
Deborah 89e0735150 [MRG+1] Deprecated GMM functions (#7012)
* added @deprecated to gmm functions

* add lmvn deprecation tests

* updated exp_msg in test_lvmpdf_full_cv_non_positive_definit

* fixed deprecated warning messages in gmm

* fixed deprecated warning messages in tests

* fixed version numbers in deprecation statements.

* fix typo in warning message

* actually fixed the deprecation messages

* remove errant var and use spherecv

* rearrange tests
2016-07-17 15:11:49 -05:00
Thierry Guillemot e669f8775b Modification of the GaussianMixture class. (#6824)
Remove the useless computation of the covariance matrix.
Prepare the integration of the BayesianGaussianMixture class.
2016-06-02 15:16:28 +02:00
Thierry Guillemot 8f199fe4f5 Modification of the GaussianMixture class to use cholesky precision matrices. (#6743) 2016-05-10 16:33:38 +02:00