Commit Graph

24 Commits

Author SHA1 Message Date
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02:00
Olivier Grisel 036dfdde21 Fix inconsistent labels returned by BayesianGaussianMixture.fit_predict (#12451) 2018-11-04 00:56:50 +11: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
Guillaume Lemaitre a38067093f [MRG+1] FIX make n_iter_ being the number of iteration performed (#11015)
*
2018-04-24 07:24:53 +10:00
Albert Thomas 45dc891c96 [MRG+2] Clean common tests (#9340)
* rm dupes

* add check_supervised_y_no_nan in classifier checks: this implies changes for Ridge classifiers

* fix docstrings/comments

* FIX check fitting 1d X array raises error and FIX check fitting 2d array with only 1 feature either works or returns informative message

* modify check_fit2d_1sample in common tests so that it checks fitting either works or returns an informative message

* rm SpectralClustering case for the moment

* uniformize error messages for 1 sample case and fix SpectralClustering with ensure_min_samples=2

* add unit test for mean_shift when n_samples * quantile < 1

* FIX travis with ensure_min_samples=2 in _PLS

* try fix for failing tSNE test

* typos

* take @agramfort's review into account

* sc to fix string in gaussian_process

* add the class that is present to preserve information of previous message in gpc.py
2017-09-26 18:13:15 +02:00
Thomas Moreau cb1b6c4734 FIX t-SNE memory usage and many other optimizer issues (#9032)
Use a sparse matrix representation of the neighbors.
Re-factored the QuadTree implementation to avoid insertion errors.
Various fixes in the gradient descent schedule to get the Barnes Hut and exact solvers to behave more robustly and consistently.
2017-07-12 22:56:02 +02:00
midinas fbcbc1b76c Documentation fix in mixture/base.py (#9237)
Documentation of the shape of _estimate_weighted_log_prob() function's return value is (n_samples, n_component)
2017-06-27 20:31:00 -07:00
(Venkat) Raghav, Rajagopalan 763d93b72e [MRG+1] Do not transform y (#9180)
* we do not transform y

* more

* added Deprecation Warning to transform() to remove Y parameter

* more

* ENH ensure FunctionTransformer's transform/inverse_transform doesn't permit y

* Undo changes to pls_. It will be done in a separate PR (see #9160)

* flake8

* Update whatsnew

* Fully undo PLS changes
2017-06-22 23:24:12 +02:00
Naoya Kanai 95aa2952e1 Add logsumexp and comb to utils.fixes (#9046) 2017-06-10 15:01:02 +02:00
Christian Danielsen 7476c4e328 Change short description of predict_proba in sklearn.mixture (#8690) (#8719) 2017-06-08 13:51:53 +02:00
Naoya Kanai bd0fc236e0 [MRG+1] MAINT drop SciPy < 0.13 (#8854)
Remove sklearn.utils.fixes functions that are not needed for scipy >= 0.13 and keep deprecated wrappers in other modules.
2017-06-02 23:36:33 +02:00
Quentin Hibon f548128e83 Fix typo in BaseMixture warning (#8616) 2017-03-22 16:32:43 +01:00
Joel Nothman 8570622a44 [MRG+1] DOC insert spaces before colons in parameter lists (#7920)
* DOC insert spaces before colons in parameter lists

Complies with numpydoc to improve rendering and automatic quality
assurance such as #7793. Affects listings of Parameters Attributes,
Returns.

Performed with the help of:

    grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R | grep -v -e
    externals -e tests | grep -v -e default: -e else: -e Warning: -e Note:
    -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: | gsed
    's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1
    +\2,1 @@\n-\3:\4\n+\3 :\4|' | git apply --unidiff-zero -

* DOC fix numpydoc format for param
2016-11-25 10:59:22 +01:00
ljwolf 55672f91b2 add shape assertions to test 2016-10-19 21:53:42 -07:00
ljwolf cfc280d658 switch to multinomial composition for mixture sampling 2016-10-19 21:53:42 -07:00
Andrew Smith 65a4de58e9 DOC: fix return value doc for mixture.base._e_step (#7682) 2016-10-17 11:04:34 +02:00
Angus Williams d356027903 DOC return values of sample() function in mixture/base.py (#7571) 2016-10-04 23:40:33 +11: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
Thierry Guillemot 1f182cc0b4 Fix -np.infty in GaussianMixture. (#7180) 2016-08-13 10:53:53 +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 0625e0384e Integration of the new GaussianMixture class.
Depreciation of the GMM class.

Modification of the GaussianMixture class.
  Some functions from the original GSoC code have been removed, renamed or simplified.
  Some new functions have been introduced (as the 'check_parameters' function).
  Some parameters names have been changed :
   - covars_ -> covariances_ : to be coherent with sklearn/covariances
  Addition of the parameter 'warm_start' allowing to fit data by using the previous computation.

The old examples have been modified to replace the deprecated GMM class by the new GaussianMixture class.
Every exemple use the eigenvectors norm to solve the scale ellipse problem (Issues 6548).

Correction of all commentaries from the PR
- Rename MixtureBase -> BaseMixture
- Remove n_features_
- Fix some problems
- Add some tests

Correction of the bic/aic test.

Fix the test_check_means and test_check_covariances.

Remove all references to the deprecated GMM class.

Remove initialized_.
Add and correct docstring.

Correct the order of random_state.

Fix small typo.

Some fix in prevision of the integration of the new BayesianGaussianMixture class.

Modification in preparation of the integration of the BayesianGaussianMixture class.
Add 'best_n_iter' attribute.
Fix some bugs and tests.

Change the parameter order in the documentation.

Change best_n_iter_ name to n_iter_.

Fix of the warm_start problem.
Fix the divergence error message.
Correction of the random state init in the test file.
Fix the testing problems.

Update and add comments into the monotonic test.
2016-04-21 18:08:54 +02:00