Commit Graph

63 Commits

Author SHA1 Message Date
puhuk 337e0d234b
DOC Use :doi: and :arxiv: directives for references (#21099) 2021-10-20 13:53:25 -04:00
Martina G. Vilas 5e85a65ab6
DOC Add grid search stats example (#17432) 2020-11-06 17:39:35 +00:00
Thomas J. Fan 3b334c5b25
MNT Uses enable_halving_search_cv instead (#18563) 2020-10-09 07:49:20 +11:00
Nicolas Hug 0a5af0d2a1
FEA Successive halving for faster parameter search (#13900)
* More flexible grid search interface

* added info dict parameter

* Put back removed test

* renamed info into more_results

* Passed grroups as well since we need n_to use get_n_splits(X, y, groups)

* port

* pep8

* dabl -> sklearn

* add _required_parameters

* skipping check in rst file if pandas not installed

* Update sklearn/model_selection/_search_successive_halving.py

Co-Authored-By: Joel Nothman <joel.nothman@gmail.com>

* renamed into GridHalvingSearchCV and RandomHalvingSearchCV

* Addressed thomas' comments

* repr

* removed passing group as a parameter to evaluate_candidates

* Joels comments

* pep8

* reorganized user user guide

* renaming

* update user guide

* remove groups support + pass fit_params

* parameter renaming

* pep8

* r_i -> resource_iter

* fixed r_i issues

* examples + removed use of word budget

* Added inpute checking tests

* added cv_resutlts_ user guide

* minor title change

* fixed doc layout

* Addressed some comments

* properly pass down fit_params

* change default value of force_exhaust_resources and update doc

* should fix doc

* Used check_fit_params

* Update section about min_resources and number of candidates

* Clarified ratio section

* Use ~ to refer to classes

* fixed doc checks

* Apply suggestions from code review

Co-authored-by: Joel Nothman <joel.nothman@gmail.com>

* Addressed easy comments from Joel

* missed some

* updated docstring of run_search

* Used f strings instead of format

* remove candidate duplication checks

* fix example

* Addressed easy comments

* rotate ticks labels

* Added discussion in the intro as suggested by Joel

* Split examples into sections

* minor changes

* remove force_exhaust_budget and introduce min_resources=exhaust

* some minor validation

* Added a n_resources_ attribute

* update examples

* Addressed comments

* passing CV instead of X,y

* minor revert for handling fit_params

* updated docs

* fix len

* whatsnew

* Add test for sampling when all_list

* minor change to top-k

* Force CV splits to be consistent across calls

* reorder parameters

* reduced diff

* added tests for top_k

* put back doc for groups

* not sure what went wrong

* put import at its place

* some comment

* Addressed comments

* Added tests for cv_results_ and base estimator inputs

* pep8

* avoid monkeypatching

* rename df

* use Joel's suggestions for testing masks

* Made it experimental

* Should fix docs

* whats new entry

* Apply suggestions from code review

Co-authored-by: Andreas Mueller <t3kcit@gmail.com>

* Addressed comments to docs

* Addressed comments in examples

* minor doc update

* minor renaming in UG

* forgot some

* some sad note about splitter statefulness :'(

* Addressed comments

* ratio -> factor

Co-authored-by: Joel Nothman <joel.nothman@gmail.com>
Co-authored-by: Andreas Mueller <t3kcit@gmail.com>
2020-09-09 17:12:35 +02:00
Juan Carlos Alfaro Jiménez 395d6c171f
DOC/FIX Remove toctree from autosummary directives outside of the API (#17358) 2020-08-19 14:35:46 +02:00
Scott Sievert 7cb5dafebb FEA Implements log-uniform random variable (#11232) 2019-10-02 13:56:24 +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
Andreas Mueller ec2ea1b5ae DOC add a more complex example to gridsearch for nested parameters (#14548)
* add a more complex example to gridsearch for nested parameters

* slight formatting fixes

* normalize whitespace doesn't do what I thought it does

* more whitespace yay

* Update doc/modules/compose.rst

Co-Authored-By: Thomas J Fan <thomasjpfan@gmail.com>

* Update doc/modules/grid_search.rst

Co-Authored-By: Joel Nothman <joel.nothman@gmail.com>

* reformulate according to Joel's suggestions

* typo

* ellipsis

* Update doc/modules/grid_search.rst

Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>

* Update doc/modules/grid_search.rst

Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>

* change the link to point to api docs for pipeline

* one more explicit use of pipeline module for linking to the API docs

* Update doc/modules/grid_search.rst

Co-Authored-By: Joel Nothman <joel.nothman@gmail.com>
2019-08-12 17:43:32 +02: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
Roman Yurchak 083985ee7f DOC Fix a few typos (#10038) 2017-10-30 08:13:16 +11:00
Balakumaran Manoharan 98a66d91b7 DOC Fix multi metric link in model selection (#9410) 2017-07-19 17:57:33 +10: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
Joris Van den Bossche 2537c313a5 DOC: fix links to examples (#9102) 2017-06-12 10:54:30 +02:00
Remi Rampin 623ee42260 Fix link to cross_validation (#9025)
Previously read "search [...] for the best Cross-validation: evaluating estimator performance score", because the title of 'cross_validation' changed.
2017-06-06 22:19:55 +02:00
Michal Baumgartner 36b38f1788 Fix typo in grid_search.rst (#8609) 2017-03-18 20:24:44 +01:00
Theofilos Papapanagiotou 2ab6460f37 Fix typo in grid_search.rst (#7918) 2016-11-21 14:58:58 +01:00
Mainak Jas 2437535344 DOC FIX: update warning about random seed with scipy (#7577) 2016-10-05 21:06:20 +11:00
mlliou112 5fcc7e5cf0 DOC: Added Nested Cross Validation Example (#7111) 2016-09-25 10:47:01 +10:00
Óscar Nájera bd5cecce44 update references link namespace 2016-08-03 20:23:50 +02:00
David Nicholson d92413b612 typofix in modules/grid_search.rst (#7045) 2016-07-21 08:28:32 +02:00
Preston Parry b661d1e216 Minor grammar fix 2016-07-12 12:22:42 -07:00
krishnakalyan3 18092fd505 fix balance 2016-06-02 15:00:40 +02:00
Raghav R V f67e911124 DOC Modify documentation/examples for the new model_selection module 2015-10-29 16:49:23 +01:00
Andreas Mueller 0650d5502e DOC adding backlinks to docstrings 2015-06-03 00:24:04 -04:00
Joel Nothman e00fd83a83 DOC narrative docs for grid search's robustness to failure 2014-11-27 10:53:29 +11:00
Joel Nothman 9af14b3587 DOC restructure data transformation user guide 2014-09-11 16:54:03 +10:00
Andreas Mueller 5b247f90e4 move around examples for better structure. 2014-07-17 09:35:30 +02:00
Lars Buitinck c176ced74d DOC double backticks for fixed-width (code) font
Fixes #3337. Also other minor fixes while I was at it.
2014-07-06 14:18:33 +02:00
Gael Varoquaux 1175352842 MISC: fix rst 2013-08-21 10:29:48 +02:00
Arnaud Joly 742b416495 DOC Remove deprecated reference + acknowledge @larsman 2013-07-28 21:15:08 +02:00
Jaques Grobler 8861833ec9 DOC spellfixes 2013-06-29 16:18:23 +03:00
Joel Nothman f3107ad326 DOC clarification of parameter search 2013-05-16 20:35:25 +10:00
Joel Nothman d0f9cab939 DOC small typographical fixes in grid_search documentation 2013-05-12 10:31:09 +10:00
Andreas Mueller 48ed945e26 DOC FIX links on grid search narrative 2013-03-05 21:03:51 +01:00
Andreas Mueller 0c94b55c63 ENH add randomized hyperparameter optimization 2013-03-03 20:56:39 +01:00
Andreas Mueller dbfd837e52 DOC remove duplicate table, add references to appropriate user guide section to docstrings of cross_val_score, GridSearchCV and permutation_test_score 2013-02-03 16:35:17 +01:00
Gael Varoquaux 9d8e6e92eb DOC: misc rst formatting 2013-02-03 15:49:40 +01:00
Gael Varoquaux 8db5750b77 DOC: minor rst issues
Plus I don't like capitalized first letters in titles
2013-02-03 15:49:40 +01:00
Andreas Mueller 374f81a760 COSMIT built-in typo 2013-02-03 15:49:39 +01:00
Andreas Mueller e9556eb2cd DOC better table of score functions in grid-search docs. 2013-02-03 15:49:39 +01:00
Andreas Mueller fb8285a4da DOC add narrative about score func objects to the model_evaluation docs. 2013-02-03 15:49:38 +01:00
Andreas Mueller a728ee2b91 DOCFIX for zero_one_score / accuracy_score renaming 2013-02-03 15:49:38 +01:00
Andreas Mueller b256d13a0f DOC fixed formatting in user guide 2013-02-03 15:49:37 +01:00
Andreas Mueller e2e8d0bae7 DOC narrative docs for scoring functions. Put them next to GridSearchCV. Should they go into metrics? 2013-02-03 15:49:37 +01:00
Gael Varoquaux 99be49e29a DOC: list of dicts in GridSearchCV 2012-11-18 19:53:54 +01:00
Gael Varoquaux 6c42e9d7c7 DOC: cosmits in docs 2012-05-06 17:56:30 +02:00
Peter Prettenhofer d6c29c0f6c Gradient Boosting also provided OOB estimates 2012-04-13 20:43:18 +02:00
Olivier Grisel 77b9bdc2a9 cosmit 2012-02-11 10:46:16 +01:00
Olivier Grisel 8abda3aa21 DOC: related improvement in GridSearchCV doc 2012-02-11 10:18:36 +01:00
Andreas Mueller cc567ee3c8 DOC what's new, minor doc improvements 2012-01-20 19:39:35 +01:00