Commit Graph

152 Commits

Author SHA1 Message Date
Yao Xiao 365ce39940
DOC minor fixes of cross-validation splitter docstrings (#27790) 2023-11-16 11:22:16 +01:00
Xiao Yuan 8ed0270b99
DOC Fix a broken link in reference (#27299) 2023-09-05 14:02:48 +02:00
Marek Hanuš 1090121815
DOC Add missing cross validation image alt (#26261)
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
2023-07-28 14:26:57 +02:00
Guillaume Lemaitre c66787ab55
ENH allow to return train/test split indices in cross_validate (#25659)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-03-09 11:35:41 +01:00
Loïc Estève 8fc372f8bc
DOC use https links when possible (#25049) 2022-11-28 10:24:43 +01:00
Arturo Amor 851d02f2ae
DOC Rework plot_grid_search_text_feature_extraction.py example (#23740)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-09-15 10:10:01 +02:00
Lucy Liu b4c2ebfcd8
DOC Clarify when GroupKFold same as LeaveOneGroupOut (#24104) 2022-09-09 21:20:36 -04:00
Lucy Liu c9d6a2769a
DOC Clarify LeaveOneGroupOut (#24159) 2022-08-24 18:19:26 +02:00
Lucy Liu 968beaaa22
DOC Improve group based CV splitter docs (#23861) 2022-07-26 12:06:14 +02:00
Logan Thomas f16c987592
DOC: various spellcheck and typos (#23093) 2022-04-12 10:53:27 +02:00
siavrez 319e91c458
DOC Update cross_validation.rst (#22067) 2021-12-23 09:35:46 -05:00
siavrez d5a0d19f3c
DOC Update cross_validation.rst (#22066) 2021-12-23 09:21:10 -05:00
Dimitri Papadopoulos Orfanos f71c031314
DOC Typos found by codespell (#21069) 2021-09-17 19:04:54 +02:00
Guillaume Lemaitre 4b0d291fb3
DOC fix hyperlink for permutation test example (#20697)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-08-07 16:39:46 -04:00
Jannik 36cc933f41
DOC Fix broken link for the paper on cross-validation (#20328) 2021-06-22 21:45:34 +02:00
Helder Geovane Gomes de Lima 0df9efe2c1
DOC Fixes typo in doc/modules/cross_validation.rst (#19925) 2021-04-19 17:48:39 -04:00
Rodion Martynov 0892a98fc9
Stratified Group KFold implementation (#18649)
* Initial implementation

* Forgot to add to second __add__ list

* Update split method parameter doc

* Added example; changed default test_size to 0.1; added to author list

* StratifiedGroupKFold impl and other improvements

* Add class to __all__ spec

* Remove random_state when no shuffle

* Tighter formatting

* Update the implementation of StratifiedGroupKFold

* Add StratifiedGroupKFold to __init__

* Add y checks to StartifiedGroupKFold

* Raise error if n_splits > max num samples in class

* Warn if n_splits > mn num samples in class

* Add SGKfold to general repr test

* Add SGKFold to 2d_y test case

* Add SGKfold to value erros test case

Parameters are the same as for StratifiedKFold
to ensure similar behavior given n_groups == n_samples

* Add SGKFold to StratifiedKFold test cases

The idea is to ensure similar behavior when groups are trivial
(n_groups == n_samples)

* Add SGKFold to reproducibility test case

* Add SGKFold to GroupKFold test case

* Add SGKFold to nested cv test case

* Add SGKFold to random_state with shuffle=False test case

* Add SGKFold to constant splits test case

* Fix repr test case

* Fix formatting issues

* Add samples to a fold with least num samples

Required to produce balanced size folds when the distribution of y is
more or less the same

* Remove GroupShuffleSplit impl

* Add notes to StratifiedGroupKFold

* Fix doctest

* Added stratified group kfold tests

* Better variable naming

* Add section to documentation

* Remove leftover StratifiedGroupShuffleSplit import

* Add changelist and reference to original kernel

* Better naming for least populated class check

* Better expression for number of labels

* Remove use of Counter

We already have this data in output of np.unique

* Add tests for homogeneous groups

* Add StratifiedGroupKFold test against GroupKFold

* Add changes to changelist in docstring

* Add StratifiedGroupKFold to classes.rst

* Fix description of StratifiedGroupKFold

* Move license notice out of docstring

* Disambiguate labels to classes in doc

* Add changelog entry

* Fix changelog author entry

* Fix StratifiedGroupKFold docstring

* Better variable names

* Remove defaultdict in favor of numpy indexing

* Extracted best_fold search into a separate method

* Make use of numpy broadcasting instead of for loop

* Encode groups and use arrays instead of dicts

* Use numpy sort instead of python

* Clarify shuffling behavior of StratifiedGroupKF in docs

* Switch name from label_idx to class_idx

* Remove accidentally leftover comment

* Fix np.sort keyword to support numpy < 1.15

* Fix typo in docstring

* Add StratifiedGroupKFold to visualization doc

* Add visualization for uneven group as an example

* Fix image numbers to match updated example

* Add author

* Add SGKF visualization to docs

* Add comments for groups in stratified CV tests

Co-authored-by: Leandro Hermida <hermidal@cs.umd.edu>
Co-authored-by: marrodion <rodion_martynov@epam.com>
2021-03-20 21:57:42 +11:00
Peter Dye 9cbe1bb8ce
DOC Evaluating estimator performance - grammar fix (#19419) 2021-02-10 10:42:57 -05:00
Kiril Isakov 35b3195958
DOC add link to stratification UG for train_test_split (#18735) 2020-11-10 16:11:05 +00:00
Nicolas Hug dccaf4c867
DOC Good practices and pitfalls for random_state (#18363) 2020-10-27 11:36:55 -04:00
Nicolas Hug e2583d45f7
DOC put back original anchor to avoid breaking links (#18551) 2020-10-06 23:45:16 -04:00
Albert Villanova del Moral 547ed6b182
DOC Improve links in cross_validation's user guide (#18379) 2020-09-24 11:19:09 -04:00
Lucy Liu 018de22323
DOC Add user guide for permutation_test_score (#18055)
* wip

* add user guide

* fix link to ex

* suggestion

* suggestions
2020-08-13 19:34:55 -04:00
Lucy Liu 6a84f79465
DOC Add example of using CV iterator to split train test (#17550) 2020-07-31 10:43:46 +02:00
Parthiv Chigurupati b78d62f9a3
DOC Updated cross validation accuracy metric (#17781)
* Updated cross validation accuracy metric

* Added deterministic results

* Update std value

Co-authored-by: Juan Carlos Alfaro Jiménez <JuanCarlos.Alfaro@uclm.es>

* Revert output

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>

Co-authored-by: Juan Carlos Alfaro Jiménez <JuanCarlos.Alfaro@uclm.es>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-07-06 14:39:05 -04:00
Kyle Kosic b4e215c01c
FEA Additional `TimeSeriesSplit` Functionality (#13204)
Co-authored-by: Kyle Kosic <kylekosic@Kyles-MacBook-Pro.local>
Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
2020-05-11 21:48:01 -04:00
Christian Lorentzen 28c08d06f9
DOC fix typos in cross validation user guide (#17042) 2020-04-26 08:23:29 -04:00
Nicolas Hug bcd399f4cb FIX Fixed some imports after deprecations (#15345) 2019-10-23 16:59:52 +02:00
Venkatachalam N ee5bc2c8e5 [MRG] Updating StratifiedKFold user_guide example (#14809) 2019-10-21 22:00:24 +08:00
Kanika Sabharwal 40c7978a64 use return_X_y=True for load_iris dataset (#14777) 2019-08-24 17:54:16 -04:00
Thomas J Fan 2e7e06b78f [MRG] Doctest with print change only adjusts default options for doctest (#13991) 2019-06-01 10:53:45 +02:00
Guillaume Lemaitre 9adba491a2 [MRG] DEP change the default of cv and n_splits (#13839) 2019-05-29 23:39:20 +10:00
Kulbear ab649266e1 DOC Fix a typo in cross_validation.rst (#13398) 2019-03-07 09:08:00 +08:00
Nicolas Hug 64f5630462 DOC Added link for cross validate in user guide (#13167) 2019-02-15 11:07:02 +11:00
Prabakaran Kumaresshan 7c6d92bbd9 DOC Add schematics for cross-validation and grid search (#12281) (#12499) 2019-01-08 17:48:23 +11: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
TakingItCasual f4e7d2b19a Converting http to https (3)... (#12302) 2018-10-05 18:50:31 +02:00
TakingItCasual 1e052e9da9 Converting http to https (2)... (#12292) 2018-10-04 23:06:14 +02:00
Andreas Mueller fb7be879a3 [MRG + 1] return_train_score deprecation (#12241) 2018-10-03 19:24:14 +02:00
Chris Holdgraf 1641f31cfa EXA Adding cv indices example (#11475) 2018-07-31 08:41:12 +08:00
Alexandre Boucaud f158e2dfe2 [MRG+1] Change CV defaults to 5 (#11557)
* add FutureWarning for methods with defaults=3

* add explicit cv values to fix assertion errors

* add tests for catching the FutureWarning

* Write current deprecation version

* Add deprecation in docstring

* change default cv value to None

* change cv from 3 to 5 in the examples

* upgrade doctests

* update doctest in tutorial

* update doctest in cross-validation doc

* fix tests

* add entry to whats new

* address Gael comments

* address Gael comments 2

* fix wrong indentation

* update doc

* add docstring deprecation warning in CV subclasses

* address Andy's comments

* fix PR number

* fix flake8

* add filterwarnings in tests

* fix doctests

* cv=None mendatory in Ridge

* fix warning related errors

* skip some doctests warnings

* make travis happy

* change from deprecated to versionchanged

* fix doctests and remove skipping

* address comments
2018-07-19 14:46:11 +02:00
Paul Paczuski 526aede6a7 DOC Update cross-validation terminology (#11387) 2018-06-29 13:23:25 +02:00
Paul Paczuski 106014e835 DOC Fix grammar in docs (#11094) 2018-05-15 15:07:22 +08:00
Loïc Estève 20661b5018
TST: only run doctests on numpy 1.14. (#10835)
Fix doctests due to numpy 1.14 formatting changes.
2018-03-27 07:44:40 +02:00
Mohammad Shahebaz 2eb731b375 DOC Note on inappropriate usage of cross_val_predict (#9883) 2018-03-08 13:26:50 +08:00
Joel Nothman 6b5440a996 DOC move plot_cv_predict example into model_selection (#10722) 2018-02-28 19:54:43 +08:00
Aurélien Bellet d9c212297e ENH add option to cross_validate to return estimators fitted on each split (#9686) 2018-02-28 09:32:46 +11:00
theriley106 08058af0c4 DOC fixed broken link in documentation (#10349) 2017-12-21 14:41:03 +01:00
Shahebaz 95d0ae6dfb [MRG+1] DOC fix headers level in cross_validation.rst (#9679) 2017-09-04 15:31:37 +02:00
Sebastin Santy 4aef698a7b [MRG] Formatting error in cross_validation.rst (#9415)
* Formatting error in cross_validation.rst

* Formatting error in cross_validation.rst

* Minor change
2017-07-19 21:33:14 +02:00