Commit Graph

98 Commits

Author SHA1 Message Date
Juan Carlos Alfaro Jiménez 373946ec9e
DOC Fix x-axis label positions for SH iterations example (#18380)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-09-12 11:13:49 -04: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
Guillaume Lemaitre e030010c6c
ENH Adds plot_det_curve and associated display (#18176)
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-08-28 22:36:52 -04:00
Oleh Kozynets d873ed152a
DOC Fix docstring in examples (#18251)
Co-authored-by: Oleh Kozynets <olehkss@github.com>
2020-08-26 10:07:02 +02:00
Guillaume Lemaitre bf4714f401
ENH follow-up style improvements of DET curves #10591 (#18169)
* follow-up on #10591 

* DOC improvements

* TST add additional test for pos_label

Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2020-08-19 12:39:56 +02:00
Daniel Mohns 41d648ef88
[MRG] Add Detection Error Tradeoff (DET) curve classification metrics (#10591)
* Initial add DET curve to classification metrics

* Add DET to exports

* Fix DET-curve doctest errors

- Sample snippet in  model_evaluation documentation was outdated.

* Clarify wording in DET-curve computation

- Align to the wording of ranking module to make it consistent.
- Add correct describtion of input and outputs.
- Update and fix non-existent links

* Beautify DET curve documentation source

- Limit line length to 80 characters.

* Expand DET curve documentation

- Add an example plot to show difference between ROC and DET curves.
- Expand Usage Note section with background information and properties
of DET curves.

* Update DET-curve documentation

- Fix typos and some grammar improvements.
- Use named references to avoid potential conflicts with other sections.
- Remove unneeded references and improved existing ones by using e.g.
using versioned links.

* Select relevant DET points using slice object

* Remove some dubiety from DET curve doc-string

* Add DET curve contributors

* Add tests for DET curves

* Streamline DET test by using parametrization

* Increase verbosity of DET curve error handling

- Explicitly sanity check input before computing a DET curve.
- Add test for perfect scores.
- Adapt indentation style to match the test module.

* Add reference for DET curves in invariance test

* Add automated invariance checks for DET curves

* Resolve merge artifacts

* Make doctest happy

* Fix whitespaces for doctest

* Revert unintended whitespace changes

* Revert unintended white space changes #2

* Fix typos and grammar

* Fix white space in doc

* Streamline test code

* Remove rebase artifacts

* Fix PR link in doc

* Fix test_ranking

* Fix rebase errors

* Fix import

* Bring back newlines

- Swallowed by copy/paste

* Remove uncited ref link

* Remove matplotlib deprecation warning

* Bring back hidden reference

* Add motivation to DET example

* Fix lint

* Add citation

* Use modern matplotlib API

Co-authored-by: Jeremy Karnowski <jeremy.karnowski@gmail.com>
Co-authored-by: Julien Cornebise <julien@cornebise.com>
Co-authored-by: Daniel Mohns <daniel.mohns@zenguard.org>
2020-08-16 11:34:37 +02:00
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