Commit Graph

95 Commits

Author SHA1 Message Date
Vinayak Mehta 679936f6bc MAINT Deprecate LDA/QDA in favor of expanded names
The LDA accronym for Linear Discriminant Analysis is ambiguous
because of the newly introduced Latent Dirichlet Allocation model.

We therefore deprecate the sklearn.lda.LDA and sklearn.lda.QDA
in favor of explicit names.
2015-09-11 15:32:11 +02:00
Alexandre Gramfort 9ebc6fe33d Merge pull request #5216 from JPFrancoia/master
Creation of the attribute LDA.explained_variance_ratio_, for the eige…
2015-09-11 11:42:39 +02:00
Vighnesh Birodkar 2f099334f9 MAINT deprecate 1d input arrays for all estimators
Passing 1D arrays to check_array, without setting `ensure_2d` to false now
raises a deprecation warning before reshaping it. This will later throw an
error.

All Scaler classes also throw warnings when 1D arrays are passed.

All unit tests/doctests are modified to ensure that no 1D arrays are passed,
except in explicit 1D array tests where the warnings have been silenced.

Additional tests are also included which check for different 1D array cases.

2D array tests with one samples and one features are also added and where
they failed, `check_array` call has been modified to give a more useful error
message
2015-09-09 15:49:58 +02:00
djipey 6e7e9d3df5 Modification of a line after @agramfort's suggestion. 2015-09-06 17:21:47 +02:00
djipey cf4bc71caa Changing [ to (. Formatting consistency. 2015-09-06 17:19:05 +02:00
djipey 3ad9972192 Addition of a piece of docstring for the attribute
explained_variance_ratio_. Creation of the function
test_lda_explained_variance_ratio to test this new attribute.
2015-09-06 11:46:54 +02:00
djipey 5a1f18312b Creation of the attribute LDA.explained_variance_ratio_, for the eigen solver.
It is an analogy to PCA.explained_variance_ratio, and works in the same
way.
2015-09-05 17:44:05 +02:00
mbillinger 7befb5d970 Explicit broadcasting 2015-08-06 17:34:46 +02:00
mbillinger 1d98ca368a Fixed shrinkage covariance for LDA 2015-08-05 16:32:38 +02:00
Andreas Mueller 0650d5502e DOC adding backlinks to docstrings 2015-06-03 00:24:04 -04:00
Andreas Mueller c02cc3dd23 FIX LDA(solver="lsqr"): make sure the right error is raised on transform. 2015-03-20 12:27:24 -04:00
Loïc Estève a13a5859e8 DOC remove sphinx warnings when generating the doc
and fixes a few other doc problems while I was at it.

The main take-home message is to remember that you need a backslash when
your parameter type description exceeds one line.
2015-03-18 15:49:30 +01:00
Loïc Estève 67dcd99d82 TST fix tests with numpy 1.6.1
np.bincount raises an Exception with empty input arrays for numpy versions < 1.6.2
Add utils.fixes.bincount to tackle this issue and use it instead of np.bincount
2015-02-01 15:49:49 +01:00
Chyi-Kwei Yau cb77255ee6 fix import error in lda.py 2015-01-18 00:32:19 -05:00
Andreas Mueller a413f875f1 DOC minor fixes do docstrings, don't document deprecated parameters. 2015-01-16 11:55:02 -05:00
Raghav R V b3fbccca38 FIX various mismatch between docstring and signature params
DOC max_iterations -> max_iter. Make it consistent with kmeans

MAINT Replace the deprecated dx parameter with d in the docstrings

MAINT Deprecation warning for max_iterations parameter.
2015-01-16 11:54:57 -05:00
Raghav R V abd31d2cad MAINT Make uniform the error raised for not fitted condition 2015-01-12 00:33:40 +05:30
Andreas Mueller 46c1c42131 remove deprecated ``n_bootstraps`` parameter in Bootstrap cv object, verbose in FactorAnalysis and SelectorMixin. Also adjust some deprecation strings. 2014-12-29 13:53:42 -05:00
Clemens Brunner 081418f573 Added documentation for the three solvers. 2014-12-16 11:50:02 +01:00
Clemens Brunner 71a23efee9 Fix problem with np.linalg.norm for version <= 1.6. 2014-12-16 11:50:02 +01:00
Clemens Brunner 936acf7e1f Works with one feature. 2014-12-16 11:50:02 +01:00
Clemens Brunner 095c7a90c6 Now correctly use weighted average to compute the class covariance. Cleaned up code and added references. 2014-12-16 11:50:02 +01:00
Clemens Brunner 70773bc5bc Added deprecation warnings to store_covariance and tol parameters in fit() method. 2014-12-16 11:50:01 +01:00
Clemens Brunner aede3d64f1 Rename parameter value 'ledoit_wolf' to 'auto'. 2014-12-16 11:50:01 +01:00
Clemens Brunner 7e4356b940 Inherit from LinearClassifierMixin. 2014-12-16 11:35:59 +01:00
Clemens Brunner f2fcafebcb Another try to fix the Travis bug. 2014-12-16 11:35:59 +01:00
Clemens Brunner 7a5563d128 (Hopefully) fixed Travis bug on Python 2.6. 2014-12-16 11:35:59 +01:00
Clemens Brunner 7c1101d7c2 Treat the binary case differently from the case when n_classes > 2. 2014-12-16 11:35:59 +01:00
Clemens Brunner 9d9eb91062 Changed parametrization of coef_ and intercept_. 2014-12-16 11:35:59 +01:00
Alexandre Gramfort a5ae150846 rename alpha to shrinkage + docstring cosmits 2014-12-16 11:35:58 +01:00
Clemens Brunner 5deb80f7b1 Fixed docstrings. 2014-12-16 11:35:58 +01:00
Clemens Brunner 97ab90b5b2 By default, estimate priors from sample. 2014-12-16 11:35:58 +01:00
Clemens Brunner 685c62794e Use broadcasting to scale back instead of multiplying with a diagonal matrix. 2014-12-16 11:35:58 +01:00
Clemens Brunner 764efbe605 Changed format of shape parameter in docstrings. 2014-12-16 11:35:58 +01:00
Clemens Brunner 76963c0712 Addressed some comments by @agramfort. 2014-12-16 11:35:58 +01:00
Clemens Brunner 4ba7c3aa43 Cleaned up one more docstring. 2014-12-16 11:35:57 +01:00
Clemens Brunner 84a41f5533 Cleaned up docstrings. 2014-12-16 11:35:57 +01:00
Clemens Brunner 4dede9aedf Raise error if alpha is not the expected type 2014-12-16 11:35:57 +01:00
Clemens Brunner 1ff5199248 Replaced str with six.string_types 2014-12-16 11:35:57 +01:00
Clemens Brunner b787f8038f Revert last commit because it broke some tests 2014-12-16 11:35:57 +01:00
Clemens Brunner 4140249893 Removed private _decision_function() 2014-12-16 11:35:57 +01:00
Clemens Brunner e4f4f6df1b Fixed doctest 2014-12-16 11:35:57 +01:00
Clemens Brunner c93485f059 PEP8 style conventions 2014-12-16 11:35:56 +01:00
Clemens Brunner 6296194edd Parameters are now consistently named; also refactored the _means_cov() function 2014-12-16 11:35:56 +01:00
Clemens Brunner b9601ccf94 Addressed @mblondel's comments 2014-12-16 11:35:56 +01:00
Clemens Brunner 7216260944 For now only the svd solver supports the transform method 2014-12-16 11:35:55 +01:00
Clemens Brunner 27f696d9fa Support manually set shrinkage parameter (alpha) 2014-12-16 11:35:55 +01:00
Clemens Brunner a98e0d361d Moved some common code into helper function 2014-12-16 11:35:55 +01:00
Clemens Brunner f130922b2e Use equal priors by default 2014-12-16 11:35:55 +01:00
Clemens Brunner 981fbe0608 Return self in fit() 2014-12-16 11:35:55 +01:00