Commit Graph

92 Commits

Author SHA1 Message Date
Maren Westermann 4e8dc9db5c
DOC shorten links in examples/* modules (#17636)
* shorten links in examples

* fix linting errors
2020-06-20 17:43:14 +02:00
Roman Yurchak 94f2e9c5d8
DOC simpler block delimitation in sphinx-gallery examples (#17068)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-06-08 23:23:14 -04:00
Sergio b70472bd24
DOC correct estimator name in example (#17239) 2020-05-16 18:07:33 -04:00
Nicolas Hug ad6fc80425
DOC fix indentation in cv parameter description (#17161) 2020-05-08 16:03:43 -04:00
Lucy Liu 92ed38598f
DOC Fix deprecation warning in plot_roc_crossval (#17155) 2020-05-07 20:01:04 -04:00
maikia 43fd8c9246
DOC exchanged boston for diabetes dataset in plot_cv_predict (#16312) 2020-01-30 13:02:06 -05:00
Brian Wignall 0e10b3a3cb DOC Fix typos, via a Levenshtein-style corrector (#15923) 2019-12-19 16:26:02 -08:00
Thomas J Fan e650a207ef ENH Adds plot_confusion matrix (#15083) 2019-11-14 14:43:54 +01:00
Thomas J Fan 968252dfb4 FEA Adds plot_precision_recall_curve (#14936) 2019-11-10 20:54:35 -06:00
Scott Sievert 7cb5dafebb FEA Implements log-uniform random variable (#11232) 2019-10-02 13:56:24 +02:00
Rok Mihevc 5e4b2757d6 TST Adding multi-output checks to common tests (#13392) 2019-10-01 14:20:11 +02:00
Thomas J Fan 14f5302b70 DOC Link items explictly (#14817)
* DOC Link items explictly

* STY

* DOC Link another
2019-09-05 11:37:05 +02:00
Allen Akinkunle 01d8e70af0 MNT Use return_X_y=True with load_boston where appropriate (#14678) 2019-08-20 10:08:23 +08:00
Thomas J Fan db79e2db42 FEA Plotting API starting with ROC curve (#14357) 2019-08-08 08:28:17 +08:00
Harsh Mahajan 38fd24ac1e EXA Remove redundant tol parameter for SGDClassifier (#14556) 2019-08-02 14:04:10 -04:00
Ruth Waithera b4f2bf4bf8 Avoid convergence warning in plot_grid_search_refit_callable (#14143) 2019-07-18 13:30:20 -04:00
Thomas J Fan dc9955b5d4 [MRG] Adds multiclass ROC AUC (#12789) 2019-07-17 16:45:27 -04:00
Tilen Kusterle a8efe00876 EXA Use return_X_y=True with load_digits where appropriate (#14359) 2019-07-14 17:10:54 +02:00
Archana Alva 40b2a6c7e3 EXA Removing redundant parameters assignment in examples (#14360) 2019-07-14 22:26:41 +08:00
H4dr1en b28aadf6ef Added fit and score times for learning_curve (#13938) 2019-06-14 14:34:26 -04:00
Guillaume Lemaitre 9adba491a2 [MRG] DEP change the default of cv and n_splits (#13839) 2019-05-29 23:39:20 +10:00
Guillaume Lemaitre 69eb4d4678 [MRG] DEP change default and deprecate iid in SearchCV (#13834) 2019-05-09 14:26:05 +02:00
Manuel López-Ibáñez 0a1ee74a14 EXA plot_confusion_matrix example breaks down if not all classes present (#13126)
* fix #12700 plot_confusion_matrix example breaks down if not all classes are present in the test data

* plot_confusion_matrix: update function call, fix style issues

* remove redundant confusion_matrix call
2019-02-10 16:05:58 +01:00
Roman Yurchak 0e3bb17e62 MAINT Run pyupgrade following Python2 deprecation (#12997) 2019-02-08 20:13:34 +08:00
surgan12 62d2059804 MNT remove __future__ imports (#12791) 2019-02-02 22:05:06 +08: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
Wenhao Zhang 581752012c ENH refit=callable in *SearchCV adds flexibility in identifying the best estimator (#11354) 2019-01-09 12:56:30 +11:00
Hanmin Qin 9acc606e60 EXA Use cv=5 instead of cv=10 in plot_validation_curve.py (#12929) 2019-01-07 15:21:42 +01:00
Mickaël Schoentgen 2df594564d EXA Fix several DeprecationWarning: invalid escape sequence in examples (#12924) 2019-01-05 12:22:36 +08:00
Adrin Jalali 2bd87f6ed8 Remove python < 3.5 from CI (#12746) 2018-12-14 10:53:12 +01:00
Quentin Batista 4b78d7abf4 DOC: Clarify `cv` parameter description in `GridSearchCV` (#12495)
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pull requests
you resolved, so that they will automatically be closed when your pull request
is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests
-->

This PR addresses issue #12466.

#### What does this implement/fix? Explain your changes.

This PR does the 3 following things:
- Rewrite the `cv` parameter description in `GridSearchCV`
- Link the new `CV splitter` description to an existing example
- Add an example with a custom iterable

Thanks for reviewing this!

Close #12466
2018-11-12 15:10:15 -05:00
Hanmin Qin dd3b705f7b MNT Unused imports in examples 2018-10-02 17:12:19 +08:00
Joel Nothman 2fe58e517c Deprecate min_samples_leaf and min_weight_fraction_leaf (#11870) 2018-08-23 08:30:47 +03: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
Hanmin Qin 9b8fd0b0d0 DOC Correct default n_jobs & reference the glossary (#11808)
Also improves the glossary entry for n_jobs.
2018-08-18 19:57:10 +10:00
Hanmin Qin d8a0f5a06c DOC best_parameters_ -> best_params_ 2018-08-16 10:03:37 +08:00
Chris Holdgraf 1641f31cfa EXA Adding cv indices example (#11475) 2018-07-31 08:41:12 +08:00
Andreas Mueller 0b8d362545 [MRG] Examples deprecations (#11561) 2018-07-17 00:08:04 -05:00
Andreas Mueller eec7649236 MAINT Complete 0.20 deprecations (#9570) 2018-06-24 23:06:26 +10:00
Ming Li 325a7f9e6c EXA prevent example xlabel cut off in plot_confusion_matrix.py (#11065) 2018-05-04 22:47:23 +08:00
Roman Yurchak d9a0774afc MAINT Always import signature from sklearn.utils.fixes (#11019) 2018-04-24 09:27:45 +10:00
Félix Raimundo 19e2772cac DOC Wording in crossval example (#10820)
Replace "Luck" by "Chance" on the crossvalidation example as it
sounds better in English.
2018-03-18 09:30:11 +11:00
Joel Nothman 6b5440a996 DOC move plot_cv_predict example into model_selection (#10722) 2018-02-28 19:54:43 +08:00
Saurabh Gupta 1776a19be6 DOC: add description for 'train_sizes' in examples.model_selection.plot_learning_curve (#10702) 2018-02-27 09:00:38 +11:00
Loïc Estève db127bd969 [MRG+1] Support minimal dependencies in examples (#10351)
* Support minimal dependencies in examples
* bins="auto" only supported for numpy >= 1.11
* viridis is default cmap in matplotlib 2
* Use signature instead of viridis cmap
2018-01-08 21:36:28 +01:00
Hanmin Qin 5963fd2150
DOC Fix broken link in ROC example (#10151) 2017-11-16 14:25:28 +08:00
syonekura 32fcc364ab [MRG+1] Setting max_iter/tol explicitly for SGD estimators in docs (#9776) 2017-10-04 17:28:32 +02:00
Anthony Gitter 59bb32ff71 DOC Add average precision definitions and cross references (#9583) 2017-09-25 20:04:21 +10:00
Tom Dupré la Tour e55d0bcba5 FIX broken link in gallery and bad title rendering 2017-07-12 16:37:49 +02:00
(Venkat) Raghav, Rajagopalan a08555a238 [MRG + 2] ENH Allow `cross_val_score`, `GridSearchCV` et al. to evaluate on multiple metrics (#7388)
* ENH cross_val_score now supports multiple metrics

* DOCFIX permutation_test_score

* ENH validate multiple metric scorers

* ENH Move validation of multimetric scoring param out

* ENH GridSearchCV and RandomizedSearchCV now support multiple metrics

* EXA Add an example demonstrating the multiple metric in GridSearchCV

* ENH Let check_multimetric_scoring tell if its multimetric or not

* FIX For single metric name of scorer should remain 'score'

* ENH validation_curve and learning_curve now support multiple metrics

* MNT move _aggregate_score_dicts helper into _validation.py

* TST More testing/ Fixing scores to the correct values

* EXA Add cross_val_score to multimetric example

* Rename to multiple_metric_evaluation.py

* MNT Remove scaffolding

* FIX doctest imports

* FIX wrap the scorer and unwrap the score when using _score() in rfe

* TST Cleanup the tests. Test for is_multimetric too

* TST Make sure it registers as single metric when scoring is of that type

* PEP8

* Don't use dict comprehension to make it work in python2.6

* ENH/FIX/TST grid_scores_ should not be available for multimetric evaluation

* FIX+TST delegated methods NA when multimetric is enabled...

TST Add general tests to GridSearchCV and RandomizedSearchCV

* ENH add option to disable delegation on multimetric scoring

* Remove old function from __all__

* flake8

* FIX revert disable_on_multimetric

* stash

* Fix incorrect rebase

* [ci skip]

* Make sure refit works as expected and remove irrelevant tests

* Allow passing standard scorers by name in multimetric scorers

* Fix example

* flake8

* Address reviews

* Fix indentation

* Ensure {'acc': 'accuracy'} and ['precision'] are valid inputs

* Test that for single metric, 'score' is a key

* Typos

* Fix incorrect rebase

* Compare multimetric grid search with multiple single metric searches

* Test X, y list and pandas input; Test multimetric for unsupervised grid search

* Fix tests; Unsupervised multimetric gs will not pass until #8117 is merged

* Make a plot of Precision vs ROC AUC for RandomForest varying the n_estimators

* Add example to grid_search.rst

* Use the classic tuning of C param in SVM instead of estimators in RF

* FIX Remove scoring arg in deafult scorer test

* flake8

* Search for min_samples_split in DTC; Also show f-score

* REVIEW Make check_multimetric_scoring private

* FIX Add more samples to see if 3% mismatch on 32 bit systems gets fixed

* REVIEW Plot best score; Shorten legends

* REVIEW/COSMIT multimetric --> multi-metric

* REVIEW Mark the best scores of P/R scores too

* Revert "FIX Add more samples to see if 3% mismatch on 32 bit systems gets fixed"

This reverts commit ba766d98353380a186fbc3dade211670ee72726d.

* ENH Use looping for iid testing

* FIX use param grid as scipy's stats dist in 0.12 do not accept seed

* ENH more looping less code; Use small non-noisy dataset

* FIX Use named arg after expanded args

* TST More testing of the refit parameter

* Test that in multimetric search refit to single metric, the delegated methods
  work as expected.
* Test that setting probability=False works with multimetric too
* Test refit=False gives sensible error

* COSMIT multimetric --> multi-metric

* REV Correct example doc

* COSMIT

* REVIEW Make tests stronger; Fix bugs in _check_multimetric_scorer

* REVIEW refit param: Raise for empty strings

* TST Invalid refit params

* REVIEW Use <scorer_name> alone; recall --> Recall

* REV specify when we expect scorers to not be None

* FLAKE8

* REVERT multimetrics in learning_curve and validation_curve

* REVIEW Simpler coding style

* COSMIT

* COSMIT

* REV Compress example a bit. Move comment to top

* FIX fit_grid_point's previous API must be preserved

* Flake8

* TST Use loop; Compare with single-metric

* REVIEW Use dict-comprehension instead of helper

* REVIEW Remove redundant test

* Fix tests incorrect braces

* COSMIT

* REVIEW Use regexp

* REV Simplify aggregation of score dicts

* FIX precision and accuracy test

* FIX doctest and flake8

* TST the best_* attributes multimetric with single metric

* Address @jnothman's review

* Address more comments \o/

* DOCFIXES

* Fix use the validated fit_param from fit's arguments

* Revert alpha to a lower value as before

* Using def instead of lambda

* Address @jnothman's review batch 1: Fix tests / Doc fixes

* Remove superfluous tests

* Remove more superfluous testing

* TST/FIX loop over refit and check found n_clusters

* Cosmetic touches

* Use zip instead of manually listing the keys

* Fix inverse_transform

* FIX bug in fit_grid_point; Allow only single score

TST if fit_grid_point works as intended

* ENH Use only ROC-AUC and F1-score

* Fix typos and flake8; Address Andy's reviews

MNT Add a comment on why we do such a transpose + some fixes

* ENH Better error messages for incorrect multimetric scoring values +...

ENH Avoid exception traceback while using incorrect scoring string

* Dict keys must be of string type only

* 1. Better error message for invalid scoring 2...
Internal functions return single score for single metric scoring

* Fix test failures and shuffle tests

* Avoid wrapping scorer as dict in learning_curve

* Remove doc example as asked for

* Some leftover ones

* Don't wrap scorer in validation_curve either

* Add a doc example and skip it as dict order fails doctest

* Import zip from six for python2.7 compat

* Make cross_val_score return a cv_results-like dict

* Add relevant sections to userguide

* Flake8 fixes

* Add whatsnew and fix broken links

* Use AUC and accuracy instead of f1

* Fix failing doctests cross_validation.rst

* DOC add the wrapper example for metrics that return multiple return values

* Address andy's comments

* Be less weird

* Address more of andy's comments

* Make a separate cross_validate function to return dict and a cross_val_score

* Update the docs to reflect the new cross_validate function

* Add cross_validate to toc-tree

* Add more tests on type of cross_validate return and time limits

* FIX failing doctests

* FIX ensure keys are not plural

* DOC fix

* Address some pending comments

* Remove the comment as it is irrelevant now

* Remove excess blank line

* Fix flake8 inconsistencies

* Allow fit_times to be 0 to conform with windows precision

* DOC specify how refit param is to be set in multiple metric case

* TST ensure cross_validate works for string single metrics + address @jnothman's reviews

* Doc fixes

* Remove the shape and transform parameter of _aggregate_score_dicts

* Address Joel's doc comments

* Fix broken doctest

* Fix the spurious file

* Address Andy's comments

* MNT Remove erroneous entry

* Address Andy's comments

* FIX broken links

* Update whats_new.rst

missing newline
2017-07-07 11:12:31 -04:00