Commit Graph

215 Commits

Author SHA1 Message Date
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
Javier López Peña 8537b212f9 Fix example in plot_pca_3d.py (color array had wrong size) 2014-11-29 15:11:36 +00:00
Kyle Kastner 5f8271f60c Updated what's new to add IncrementalPCA 2014-09-23 10:14:45 -04:00
Kyle Kastner b2d6a30aeb IncrementalPCA implementation 2014-09-22 13:12:29 -04:00
Andreas Mueller 5b247f90e4 move around examples for better structure. 2014-07-17 09:35:30 +02:00
bwignall 9bee5b4d2f CLN: Capitalize "Dirichlet" and "Mexican" in example docstrings 2014-06-01 17:43:21 -04:00
bwignall 34fc4d4214 CLN: Capitalize "Gaussian" in example docstrings 2014-06-01 16:53:23 -04:00
Olivier Grisel 1a05e6d3f7 FIX: euclidean divide in plot_image_denoising.py for Py3 support 2014-05-23 13:33:13 +02:00
Rajat Khanduja cca6fc7e8b Some more examples updated to use matplotlib.pyplot 2014-05-16 09:42:02 +05:30
Rajat Khanduja 5e20b8c664 Fixed pep8 violations. Some 'line too long' errors still remain. 2014-05-15 09:23:16 +05:30
Rajat Khanduja 2244098532 Updated examples to use pyplot for plotting instead of pylab
Some examples not updated because scripts throw error (probably not
because of the change)
2014-05-15 02:18:07 +05:30
Joel Nothman dbc26ce996 COSMIT remove unused imports and variables 2014-02-03 19:43:56 +11:00
dengemann 2843ee19e9 manual subplots adjust
manual subplots adjust
2013-12-02 13:10:00 +01:00
dengemann 925aa1ee5e Improve wording + COSMITS II 2013-12-02 11:46:35 +01:00
dengemann f3c09df70c Improve wording + COSMITS 2013-12-02 11:44:53 +01:00
dengemann efe5294b00 COSMIT 2013-12-02 09:52:42 +01:00
dengemann 05188ef984 ICA vs PCA barrier free + fixed 2013-12-02 09:39:15 +01:00