Commit Graph

231 Commits

Author SHA1 Message Date
Jona Sassenhagen 5e193ec655
[MRG] varimax rotation for factor analysis (#11064)
* init varimax

* fix py2 and add example text

* fix print again

* test, docs

* fix test

* fix doctstring

* np.allclose for test

* add refrence

* address comments

* update

* Fix linting failure.

* Fix deprecation warning.

* a bit of cleanup

* Address @jnothman's review comments.

* Update section divider

* Add note in what's new page and versionadded to docstring.

Co-authored-by: Eric Prestat <eric.prestat@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-07-05 21:29:08 +02: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
Hirofumi Suzuki c29092d699
MNT define a parse_version function in sklearn.utils.fixes (#17670)
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2020-06-24 13:35:49 +02:00
Juan Carlos Alfaro Jiménez c298cb771d
MNT Fix documentation build due to failure in plot_ica_vs_pca (#17629) 2020-06-18 10:22:17 +02:00
Saurabh Jain 00bc681e10
DOC shorten class links in docstring using tilde (#17470)
* added tilde to bunch of files

* Updated _kde.py

Changed array_like to array-like

* Updated _kde.py

Removed space

* updated _kde.py

Added full stop

* PEP8

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2020-06-16 10:44:13 +02:00
Nicolas Hug 226e5c478d
MNT Use Vt instead of V as returned by svd() (#17100) 2020-05-05 19:52:07 +02:00
Thomas J Fan 5756a9934b MNT Make modules private in decomposition (#15344) 2019-10-28 22:46:16 +08:00
Chiara Marmo 6bd8df099f DOC Fix warnings about references and links (#14976) 2019-09-23 11:49:08 -04:00
Sourav Singh f8e4cc495a ENH Add return_X_y to 20_newsgroups and olivetti_faces (#14259) 2019-07-20 10:30:09 +08:00
Archana Alva 40b2a6c7e3 EXA Removing redundant parameters assignment in examples (#14360) 2019-07-14 22:26:41 +08:00
Adrin Jalali 7b8cbc875b ENH add a `transform_max_iter` to `SparseCoder`, `DictionaryLearning`, and `MiniBatchDictionaryLearning` (#12682) 2019-07-08 16:10:29 -05:00
Reza Gharibi 3ab22f973f [MRG] Fix overlapped plot in the ICA example (#14213) 2019-06-28 10:45:15 -07:00
Guillaume Lemaitre 9328581ec5
FIX use CD solver in face decomposition to use postive parameter (#13975) 2019-05-29 15:05:02 +02:00
Guillaume Lemaitre a98db9a4d6
DEP change default and deprecate normalize_components in SparsePCA (#13838) 2019-05-29 12:06:50 +02:00
Hanmin Qin a300e7c0cd EXA Avoid overlapping subplots in plot_kernel_pca.py (#13870) 2019-05-13 11:22:31 -07:00
xinyuliu12 933f80a32d MAINT: reduce example execution time of plot_image_denoising.py (#13683) 2019-04-23 20:56:11 +02:00
Adrin Jalali 69c8967e21 DOC Fix warnings in examples (#12654)
Fixe or suppresses many warnings in examples, including matplotlib complaining about the non-gui backend.
2019-01-17 21:41:13 +11:00
Mickaël Schoentgen 2df594564d EXA Fix several DeprecationWarning: invalid escape sequence in examples (#12924) 2019-01-05 12:22:36 +08:00
Hanmin Qin 8890b50606 [MRG+1] EXA Set cv=5 in examples (#11856)
* EXA Set cv=5 in examples

* small mistake

* [doc build]

* [doc build]

* cross_val*

* [doc build]

* [doc build]
2018-08-20 15:22:42 -04:00
Ivan PANICO 6eb19831d1 BUG: centering and fixing scaling issue in SparsePCA (#11585) 2018-07-21 00:00:15 +02:00
Loïc Estève 20b19f8415 Remove FutureWarning about rcond by specifying it explictly (#11571) 2018-07-17 19:33:36 +02:00
jakirkham 6ce497c3bc [MRG] ENH: Optional positivity constraints on the dictionary and sparse code (#6374)
* ENH: Add positivity option for code and dictionary

Provides an option for dictionary learning to positively constrain the
dictionary and the sparse code. This is useful in applications of
dictionary learning where the data is know to be positive (e.g. images),
but the sparsity constraint that dictionary learning has is better
suited for factorizing the data in contrast to other positively
constrained factorization techniques like NMF, which may not be
similarly sparse.

* TST: Test positivity with code and dictionary

Ensure that when the positivity constraint is applied that the
dictionary and code end up having only positive values in the respective
results depending on whether dictionary and/or code are positively
constrained.

* DOC: Positivity constraints dictionary learning

Shows the various positivity constraints on dictionary learning and what
the results of these look like using a Red to Blue color map. These are
included in the examples and also in the docs below dictionary learning.
All of these use the Olivetti faces as a training set.
2018-06-21 16:36:48 +02:00
Hanmin Qin 6f7394953b EXA avoid use of matplotlib.cm.spectral which has been removed (#10764) 2018-03-07 16:49:45 +11:00
Hanmin Qin 32ac22870d [MRG+1] Fix warnings in lgtm.com (remove redundant code) (#9719) 2017-09-14 11:42:58 +02:00
Aarshay Jain a74d31a339 ENH 13 more examples fixed with matplotlib 2.0 (#9029) 2017-06-28 14:56:27 +02:00
plagree 1f6ac72df7 [MRG] DOC examples with correct notebook style (#9061)
* DOC examples with correct notebook style

* Modifications in examples/ to avoid unwanted notebook style

* Remove last notebook style example

* Space formatting to avoid notebook style
2017-06-20 14:48:57 +02:00
DOHMATOB Elvis f4b230cc65 BF: fixing error on plot_image_denoising.py with Python 2.7 (#9003) 2017-06-06 14:36:13 +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
Alison 34a3c99b88 [MRG+1] add edgecolor to plot_pca_iris.py (#8514)
for better rendering with matplotlib 2
2017-03-09 18:54:38 +01:00
Aman Dalmia 13cc121b30 [MRG] Remove DeprecationWarnings in examples due to using floats instead of ints (#8040) 2017-02-03 15:21:03 +01:00
Tom Dupré la Tour ae4f7104d6 [MRG+1] Add multiplicative-update solver in NMF, with all beta-divergence (#5295) 2016-12-12 16:10:39 +01:00
Alexandre Abadie 29992d958f add explicit comment in face decomposition example 2016-09-19 14:27:07 +02:00
Alexandre Abadie 77d9c09ba9 fixing failing faces decomposition example 2016-09-19 10:55:05 +02:00
Alexandre Abadie 171b31d0b8 DOC fix deprecation warning in faces decomposition example 2016-09-17 21:53:45 +02:00
Robert Lutz 0c879ba551 [MRG+1] Fix: Replace pylab with matplotlib.pyplot #6754 (#6762)
* Fix: Replace pylab with matplotlib.pyplot #6754

 - one instance of 22 occurrences of pylab replaced with matplotlib.pyplot
 - bench_glm.py now free of pylab references
 - code executes properly

* Fix: Replace pylab with matplotlib.pyplot #6754

- one instance of 21 remaining occurrences of pylab replaced with
    matplotlib.pyplot
- bench_glmnet.py now free of pylab references
- code does not execute for extraneous reason: ImportError: No module named
    glmnet.elastic_net

* Fix: Replace pylab with matplotlib.pyplot #6754

- one instance of 19 occurrences of pylab replaced with matplotlib.pyplot
- bench_lasso.py now free of pylab references
- code executes properly

* Fix: Replace pylab with matplotlib.pyplot #6754

- one instance of 18 occurrences of pylab replaced with matplotlib.pyplot
- bench_plot_neighbors.py now free of pylab references
- code executes properly

* Fix: Replace pylab with matplotlib.pyplot #6754

- one instance of 17 occurrences of pylab replaced with matplotlib.pyplot
- bench_plot_omp_lars.py now free of pylab references
- code does not execute for extraneous reasons:
    - File "bench_plot_omp_lars.py", line 111, in <module>
    - ax = fig.add_subplot(1, 2, i)
    - ValueError: num must be 1 <= num <= 2, not 0
    - line 111 should probably be ax = fig.add_subplot(1, 2, i+1)

* Fix: Replace pylab with matplotlib.pyplot #6754

- bench_plot_parallel_pairwise.py now free of pylab references
- code executes properly

* Fix: Replace pylab with matplotlib.pyplot #6754

- bench_plot_ward.py now free of pylab references
- code executes properly

* Fix: Replace pylab with matplotlib.pyplot #6754

- bench_sgd_regression.py now free of pylab references
- code executes properly

* Fix: Replace pylab with matplotlib.pyplot #6754

- bench_tree.py now free of pylab references
- code executes properly

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- bench_glm.py clean

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- bench_glm.py clean of pl
- code does not execute for extraneous reasons

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- bench_lasso.py clean of pl
- code executes properly

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- bench_plot_neighbors.py clean of pl
- code executes properly

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- bench_plot_omp_lars.py clean of pl
- code does not execute for extraneous reasons

* fix: Fix bug that prevented graphs from displaying

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- bench_plot_parallel_pairwise.py clean of pl
- code executes properly

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- bench_plot_ward.py clean of pl
- code executes properly

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- bench_sgd_regression.py clean of pl
- code executes properly

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- bench_tree.py clean of pl
- code executes properly

* docs: removed pylab references from comments

* docs: removed all pylab references

- replaced with matplotlib.pyplot
- pl --> plt

* docs: removed pylab references from comments

- replaced with matplotlib.pyplot
- pl --> plt

* docs: removed all pylab references

- replaced with matplotlib.pyplot
- pl --> plt

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- mlcomp_sparse_document_classification.py clean of pl

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- plot_gpr_noisy_targets.py clean of pl
- code does not execute for extraneous reasons
  - File "examples/gaussian_process/plot_gpr_noisy_targets.py", line 31, in
      <module>
  - from sklearn.gaussian_process import GaussianProcessRegressor
  - ImportError: cannot import name GaussianProcessRegressor

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- plot_gpc_isoprobability.py clean of pl
- code does not execute for extraneous reasons
  - File "examples/gaussian_process/plot_gpc_isoprobability.py", line 24, in
      <module>
  - from sklearn.gaussian_process import GaussianProcessClassifier
  - ImportError: cannot import name GaussianProcessClassifier

* docs: removed all pylab references

- replaced with matplotlib.pyplot
- pl --> plt

* docs: removed all pylab references

- replaced with matplotlib.pyplot

* refactor: Replace pl with plt

- replace instances of pl (as on import pylab as pl)
  with plt (as in import matplotlib.pyplot as plt)
- plot_sparse_coding.py clean of pl
- code executes properly

* docs: removed all pylab references

- replaced with matplotlib.pyplot

* docs: removed all pylab references

- replaced with matplotlib.pyplot

* style: Indent properly

* style: indent properly

* style: Indent properly

* docs: Add missing .pyplot

* docs: Fix typo

* style: Indent properly
2016-05-10 11:34:33 +02:00
Rémy Léone 9b7176dd9d [DOC] Fix broken links 2016-03-23 12:45:34 -07:00
giorgiop 328ebfa865 ENH RandomizedPCA collapsed into PCA 2016-03-11 09:10:37 +11:00
Nelson Liu fcfaa5fc37 Updated examples and tests that use scipy's lena
scipy.misc.lena will be removed in scipy version 0.17.
This changes the example to use scipy.misc.face instead.
2016-02-11 09:13:40 +01:00
toastedcornflakes 2ff9a4b39d Remove useless normalization — fixes #6075 2015-12-30 15:02:57 +01:00
Andreas Mueller 5b1aca08c2 MAINT Don't use deprecated 1d X (or deprecated matplotlib stuff) in examples. 2015-12-10 12:11:48 -05:00
hlin117 c6d6170148 #5766: Removed unused code from plotting tutorial 2015-11-12 10:16:10 -06:00
Raghav R V f67e911124 DOC Modify documentation/examples for the new model_selection module 2015-10-29 16:49:23 +01:00
johannah 0c29002b30 Added colorblind compatibility 2015-10-26 20:46:48 +01:00
TomDLT ceeef70037 ENH refactor NMF and add CD solver 2015-09-21 11:42:07 +02:00
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
Mathieu Blondel d341dac18d Remove shebang and utf-8 header. 2015-08-11 02:24:11 +09:00
Mathieu Blondel 0586070499 chmod -x 2015-08-11 02:15:44 +09:00
Arthur Mensch fead69a4ac Bugfix : type in cd changed for read only memmap compatibility 2015-07-31 12:12:40 +02:00
Andreas Mueller 891b8417c9 DOC remove linewidth in pca/ica example 2015-06-11 13:25:36 -04:00
Ali Baharev b1348bbc14 Typo: PCA is not the abbreviation of Probablisitic 2015-03-30 22:17:39 +02:00