Commit Graph

2670 Commits

Author SHA1 Message Date
Olivier Grisel a86fd7f5e7 Add Dirichlet process prior to BayesianGaussianMixture (#7386) 2016-09-10 15:41:52 +02:00
Gael Varoquaux 4b2304f05a Merge pull request #7261 from betatim/negative-scorers
[MRG + 2] Rename scorers like `mse` to `neg_mse`
2016-09-08 20:40:17 +02:00
Raghav R V 4dbab2680e results_ --> cv_results_; "test_mean_score" --> "mean_test_score" et al. 2016-09-06 18:46:09 +02:00
Tim Head 6673f75828 Update examples to new scorer names 2016-09-06 11:25:11 +02:00
Loïc Estève f7bdba20da Merge pull request #7300 from nelson-liu/rename_unveil_tree_structure
[MRG] rename unveil_tree_structure example to enable CI on it
2016-08-31 13:43:19 +02:00
Nelson Liu 82f913d72a
rename unveil_tree_structure example to enable CI on it 2016-08-30 18:18:24 -06: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
Joel Nothman 0a0bf2478e Revert "ENH: Add indicator features to imputer output (#6607)" (#7292)
This reverts commit 18396be8cb as it was
merged when incomplete.
2016-08-30 21:28:01 +10:00
Joel Nothman 5b20d484ad [MRG] ENH enable setting pipeline components as parameters (#1769)
Pipeline and FeatureUnion steps may now be set with set_params, and transformers may be replaced with None to effectively remove them.

Also test and improve ducktyping of Pipeline methods
2016-08-29 23:32:42 +10:00
Preston Parry 58b35d8b9f DOC Updates sklearn naming convention for consistency (#7268)
* Updates sklearn naming convention for consistency

* minor grammar fix

* clarifies source of string vs. function cosine
2016-08-29 08:20:13 +10:00
Alexandre Gramfort abee34e299 phrasing 2016-08-24 08:39:44 +02:00
Yen 42120e50bb [MRG+1] Rename CV params n_{folds,iter} to n_splits (#7187)
* Rename n_iter to n_splits

* Fix bug

* Fix examples

* Add spaces

* Rename n_folds to n_splits

* Fix error

* Fix doc

* Fix doc

* Fix example

* Rename variables name

* PEP8

* Fix error message

* Add whats_new

* Fix test

* Fix doc

* Fix doc

* Make test clear
2016-08-16 13:56:55 -07:00
Iver Jordal ba2bcde32e Fix typo in example feature_stacker.py 2016-08-04 21:52:10 +02:00
Óscar Nájera 90fe87fea5 Extra missing links complained by sphinx 2016-08-03 20:23:50 +02:00
Óscar Nájera e10a272600 Fix example to use rst syntax in notebook comments 2016-08-03 20:23:50 +02:00
Óscar Nájera 8b46c616df Python 2 backwards compatibility in example
This lines breaks the gallery build in python 2, which is the version on
which CircleCI runs. Other option is to build the docs on Python 3
2016-08-03 20:23:50 +02:00
Óscar Nájera bd5cecce44 update references link namespace 2016-08-03 20:23:50 +02:00
Nate George 9b25f5d37a Fix docs links (#7005)
* docs: fix broken and redirect links

see #7000

* docs: fix links

see #7000

* docs: merge with master

* docs: fix fnrs and tinyclues logo links

* docs: fix link reference in text

* docs: fix typo

* docs: added back in metaoptimize-qa paragraph

* docs: update language for defunct site

* docs: update stackexchange section

* docs: remove defunct site, move quora to top

* docs: remove defunct link and rearrange links
2016-07-27 16:58:25 -04:00
Andreas Mueller 8972d82a1f DOCS / COSMIT duplicate word typos 2016-07-26 10:44:32 -04:00
Andreas Mueller 97c47d9671 Merge pull request #6966 from doshyt/doc-update-confusion
[MRG] DOC make confusion_matrix_plot.py example more copy-pastable
2016-07-15 17:03:19 -05:00
Igor Andriushchenko 7b7093ceda DOC make confusion_matrix_plot.py exmaple more copy-pastable 2016-07-15 00:40:03 +03:00
fisache b242539fc0 Fix minor typo 2016-07-13 16:23:14 +09:00
Shota e2a2b4d403 Fix typos (#6942) 2016-06-27 18:13:49 +02:00
hashcode55 1bec8e3937 first commit 2016-06-19 02:53:34 +05:30
Raghav R V afd5d18b0c [MRG] ENH Restructure grid_scores_ into a dict of 1D arrays
Also, DOC what's new section for model_selection changes
2016-06-16 12:23:04 +10:00
Gael Varoquaux 1837224751 Merge pull request #6613 from nelson-liu/correct_license_spelling
[MRG+1] DOC: fix spellings of 'license'
2016-06-15 13:58:59 +02:00
Alexandre Gramfort a374fa3b41 fuse anomaly examples 2016-05-22 21:55:33 +02:00
Nicolas Goix f89fe80b1c cosmit 2016-05-22 21:55:33 +02:00
Nicolas Goix 37b1594bf1 add an example + change predict to respect convention 2016-05-22 21:55:33 +02:00
Ariel Rokem c95a0cb642 Typo in `plot_cv example` 2016-05-17 05:24:25 -07:00
Thierry Guillemot 8f199fe4f5 Modification of the GaussianMixture class to use cholesky precision matrices. (#6743) 2016-05-10 16:33:38 +02:00
Tom Dupré la Tour 2dd5a9a1b0 change last pl to plt 2016-05-10 11:41:13 +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
David Ellis 65c4df130b Update plot_roc_crossval.py (#6765)
List "all_tpr" was not being used.
2016-05-07 17:32:49 +02:00
Saiwing Yeung 7c0ebbc226 FIX does not draw the ellipse! #6640 (#6757)
* FIX does not draw the ellipse! #6640

* Give ellipses a higher z-order, yellow border, and thicker border.

* Add an alpha level to the markers so that it is easier to tell how
many there are.

* Change false positive to asterisks so that they have similar sizes as
the true positives.

* Fix line too long issue
2016-05-05 09:44:17 +02:00
Thierry Guillemot 78a674875e Correct the deprecation of the random_integers numpy function. (#6712) 2016-04-26 16:08:48 +02:00
Saiwing Yeung c5fd5cbb7e DOC: fixed typos and one style issue in plot examples
The comment in a few example plots refer to "the mesh [x_min, m_max] x
[y_min, y_max]" when it should be "x_max".

Also fixed the spacing in plot_random_forest_embedding.py `[x_min,
x_max] x [y_min, y_max]` to `[x_min, x_max]x[y_min, y_max]` to comply
with the coding style of other files with similar code (like those in
the current pull request).
2016-04-25 11:59:40 +08: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
Maniteja Nandana 18396be8cb ENH: Add indicator features to imputer output 2016-04-14 12:21:16 +05:30
Jeroen Van Goey 7e8f8b7ba9 Update plots_digits_classification.py
DOC Update comment in plots_digits_classification
2016-04-07 16:02:15 +02:00
Nelson Liu d2aaf0f4bb doc: fix spellings of 'license' 2016-03-31 17:25:31 -07: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
Tim Head 07cede74ca Multitarget regression meta estimator
Register OneVsRestRegressor as meta estimator

Rename to a more sensible name

Parallel predict and sparse support

Started MultiOutput documentation

Move code to new file multioutput.py

Continuing the move to new multioutput module

Added sample weight support

Better test for sample weights and actually support weights

Added a new test using weighted vs repeated samples to
test sample weight support. Uncovered that weights
were not actually passed on to underlying estimator.

Comment on multiprocess overheads

Move parallel_helper to utils.fixes

This helper works around a python2 limitation on pickling
instance methods

Example of multi-output regression with gradient boosting

Switch to uniform weighted score and updated example

The example now uses a RF with and without the MultiOutput
meta estimator

Added note for removing `score` method

Addressing comments on MultiOutputRegressor

MultiOutputregressor better test for weighted samples

Fix ups

Use explicit keyword argument for passing sample weights and
fix random_state on train-test split in the example
2016-03-10 16:06:08 -05:00
Lars Buitinck 2e4aafd19c MAINT remove my email address
I'm getting too many individual support requests. People should
use the mailing list.
2016-03-04 10:43:41 +01:00
MechCoder 7e79adca9d Huber regressor
Add gradient calculation in _huber_loss_and_gradient

Add tests to check the correctness of the loss and gradient

Fix for old scipy

Add parameter sigma for robust linear regression

Add gradient formula to robust _huber_loss_and_gradient

Add fit_intercept option and fix tests

Add docs to HuberRegressor and the helper functions

Add example demonstrating ridge_regression vs huber_regression

Add sample_weight implementation

Add scaling invariant huber test

Remove exp and add bounds to fmin_l_bfgs_b

Add sparse data support

Add more tests and refactoring of code

Add narrative docs

review huber regressor

Minor additions to docs and tests

Minor fixes that deals with dealing with NaN values in targets
and old verions of SciPy and NumPy

Add HuberRegressor to robust estimator

Refactored computation of gradient and make docs render properly

Temp

Remove float64 dtype conversion

trivial optimizations and add a note about R

Remove sample_weights special_casing

address @amueller comments
2016-02-25 16:31:08 -05:00
YenChenLin 46fc1be145 Remove redundant words in sklearn 2016-02-23 16:54:03 +08:00
YenChenLin 2d8eb008d2 Fix broken link of Wainwright's paper 2016-02-18 01:09:20 +08:00
alyssaq d2b6c7a37d Fixed legend text and pep8 warnings 2016-02-15 14:12:25 +08:00
Andreas Mueller c761ba7661 Merge pull request #6260 from ogrisel/pr-5920-followup
[MRG] Updated examples and tests that use scipy's lena
2016-02-11 10:53:51 -05:00