Commit Graph

168 Commits

Author SHA1 Message Date
Alex 72bd9f335f
DOC Fix duplicate-word typos (#22454) 2022-02-11 22:47:10 -05:00
Meekail Zain bdb7db524a
DOC Clarify splitting behavior of `fit_params` (#22379)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Tom Augspurger <tom.w.augspurger@gmail.com>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-02-09 15:00:07 -05:00
Guillaume Lemaitre 229bd226ab
MNT remove _pairwise attribute (#21594) 2022-02-09 16:58:01 +01:00
Ross Barnowski 24106c2149
DOC Fix incorrect heading underline length in docstrings (#22278) 2022-01-24 09:58:33 -05:00
MrinalTyagi 7774697ea5
FIX GridSearchCV and HalvingGridSearchCV remove validation from __init__ and set_params (#21880)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-12-15 11:34:22 +01:00
Loïc Estève 93bc20f7eb
Raise an error when all fits fail in cross-validation or grid-search (#21026) 2021-10-05 16:42:51 +02:00
Niket Jain c588230dad
DOC Ensures that RandomizedSearchCV passes numpydoc validation (#21131) 2021-09-24 13:59:04 +02:00
EricEllwanger 28ef997336
DOC - Ensures that GridSearchCV passes numpydoc validation (#21003) 2021-09-13 11:12:51 +02:00
genvalen 642127806a
DOC use backticks for n_samples and n_features in X docstring (#20914) 2021-09-02 13:35:03 +02:00
Guillaume Lemaitre cf2e4e3340
MNT replace if_delegate_has_method by available_if in _search.py (#20685)
* MNT replace if_delegate_has_method by available_if in _search.py

* iter

* iter

* apply changes from thomas

* iter

* fix

* iter
2021-09-01 11:50:16 +02:00
Olivier Grisel 2a6426fb3f
Check feature_names_in_ for sklearn.model_selection (#20850)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-08-26 22:58:11 +02:00
Loïc Estève 7317416193
Warn in the main process when a fit fails during a cross-validation (#20619)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-08-10 16:31:26 +02:00
julyrashchenko b41cb296ff
DOC Fix default pre_dispatch value in docstring (#20596) 2021-07-24 17:18:09 -04:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Thomas J. Fan 383b53fa91
FIX Uses code literals in deprecated to prevent linking (#20410)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-06-28 15:49:19 +02:00
Thomas J. Fan 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
Guillaume Lemaitre 05319e727b
TST common tests for n_features_in_ for model_selection module (#20204)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-06-15 19:20:20 +02:00
Guillaume Lemaitre 6484c4f0ec
TST add HalvingSearchCV to common test (#20203) 2021-06-15 18:16:50 +02:00
Thomas J. Fan 9a13bdfaf1
MNT Adds black config and fixes formatting before black (#19031)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2021-06-12 17:14:09 +02:00
Jérémie du Boisberranger b15e312b29
TST test_fit_docstring_attributes include properties (#20190) 2021-06-07 17:48:17 -04:00
Tom Dupré la Tour f6e6ad2d9e
MNT clean futurewarning for 1.0 | _deprecate_positional_args (#20002)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-05-14 11:30:27 -04:00
Jérémie du Boisberranger 0f85e6b32f
MNT Clean deprecations for 1.0 | Search (#19321)
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
2021-05-11 16:41:36 -04:00
Nicolas Hug 872052b9ab
FIX convert cv_results_ values to numpy array in SuccessiveHalving (#19211)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-04-14 09:30:25 +02:00
Alihan Zihna 734ae1f2df
DOC add explicit message regarding shuffling in default CV (#19776)
Co-authored-by: Alihan Zihna <a.zihna@ckhgbdp.onmicrosoft.com>
2021-04-09 10:37:15 +02:00
Ashish 70c6ac9d04
DOC Fixed typos in documentation (#19511) 2021-02-20 12:01:19 -05:00
Thomas J. Fan 95fa18f278
TST Fixes docstring ordering and test_docstring_parameters (#19048) 2021-02-12 11:35:05 +01:00
Guillaume Lemaitre e4ae68f09a
DOC add info regarding support of dict of multimetric scores (#19205)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-01-19 17:53:22 -05:00
Guillaume Lemaitre 2218ec4622
MNT change 0.25 to 1.0 and 0.26 to 1.1 in deprecation messages (#19005)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-12-18 16:09:19 +00:00
Guillaume Lemaitre 255718b4ad
introduce _safe_tags for estimator not inheriting from BaseEstimator (#18797)
Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2020-12-02 11:18:53 +01:00
Guillaume Lemaitre ed4e539237
TST enable common tests for SearchCV (#18158) 2020-10-12 16:17:17 +02:00
Thomas J. Fan 02fa8f1adb
ENH Deprecates _pairwise attribute and adds pairwise to estimator tags (#18143) 2020-10-07 21:53:36 +11:00
Thomas J. Fan 06d6f8a9f6
FIX Passes global configuration when spawning joblib jobs (#17634)
* WIP

* BUG Passes context to joblib jobs

* BUG Fix

* BUG Fix

* CLN Moves delayed into fixes

* CLN Adds linter

* REV Revert diff

* DOC Adds comment for removal

* Use a simple implementation
2020-09-21 16:59:42 +02: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
Albert Villanova del Moral 647fcb1ac1
DOC Fix A to uppercase in See Also docstring section (#18332) 2020-09-04 10:35:01 -04:00
Albert Villanova del Moral 875d32fe55
DOC Fix versionadded/versionchanged for 0.24 (#18312) 2020-09-01 10:51:01 +02:00
subrat93 192c2333fe
ENH Raises warning when getting non-finite score in SearchCV (#18266)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2020-08-29 10:34:02 -04:00
Frans Larsson c6579afdc4
DOC add None as valid option to random_state in model_selection module (#18232) 2020-08-22 17:32:36 +02:00
Nicolas Hug 28c1ed473f
[MRG] FIX len() of ParameterSampler (#18222)
* fix len

* whatsnew
2020-08-21 13:13:31 -04:00
Thomas J. Fan 9acfaab966
ENH Adds support for multimetric callable return a dictionary (#15126) 2020-07-16 17:55:40 +02:00
Thomas J. Fan 67bf1e78f5
ENH _fit_and_score now returns a dictionary (#17332)
* ENH _fit_and_score now returns a dictionary

* MRG

* REV

* LOL

* Removing things in gitignore is fun
2020-06-26 12:38:12 +02:00
Thomas J. Fan 7cc0177f8e
MNT Replaces numpy alias with builtin typse (#17687)
* MNT Replaces numpy alias with builtin typse

* STY Lint error
2020-06-24 16:51:51 +02:00
Chiara Marmo fc0d2c3210
[MRG] ENH Show split/candidate ids in verbose output of SearchCV (#16935) 2020-06-19 11:26:58 +02:00
Teon L Brooks 5d04910476
ENH add score_samples method in base search CV (#17478)
* add score_samples method in base search CV and add tests

* add tests and change implem

* fix pep8

* address some pr comments

* Update test_search.py

remove deprecation warnings

* address some linting issues

* Update test_search.py

* update whats_new

fix indenting

* update test_search.py

Co-authored-by: Mohamed Maskani <maskani.mohamed@gmail.com>
2020-06-08 18:14:12 +02:00
Zaccharie Ramzi d42611f11b
DOC Emphasized determinism of ParameterGrid in docs (#17383) 2020-05-31 21:26:50 -04:00
Nicolas Hug ac8cbb3799
[MRG] More deprecation for 0.24 (#17142)
* normalize_components in sparsePCA

* changed default strategy of Dummy to prior and removed outputs_2d ttribute

* removed usage of None to drop estimator in ensemble and behaviour param of IsolationForest

* remove support for drop=None in Voting

* removed some warning decorators

* remove feature_extraction.extract_patches

* removed VectorizerMixin and copy parameter from TFIDFVectorizer

* kernel.set_params now raises attributeerror

* removed fig from plot_partial_dependence

* removed iid parameter of search estimators

* removed brier_scorer

* raise error in split when shuffle is False and random_state is not None

* removed MultiOutputEstimator

* removed base classes of NaiveBayes

* removed drop from pipeline

* removed utils in random_projection

* removed presort and classes_ in trees

* flake8

* fixed some tests

* flake

* fixed docstring

* fixed other one

* some left

* mmmm
2020-05-20 16:04:14 -04:00
barberogaston 26b26789a6
DOC Fix RandomizedSearchCV's docstring by changing the cv_results_ data (#17275) 2020-05-20 14:11:46 +02:00
Nicolas Hug ad6fc80425
DOC fix indentation in cv parameter description (#17161) 2020-05-08 16:03:43 -04:00
Ekaterina Borovikova 4755ae76d2
DOC Add versionchanged and versionadded for v0.20 (#16199)
Co-Authored-By: Adrin Jalali <adrin.jalali@gmail.com>
Co-Authored-By: Chiara Marmo <cmarmo@users.noreply.github.com>
Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>
2020-04-26 09:29:36 -04:00
Adrin Jalali 02309ffbda
API kwonly args in manifold, metrics, mixture, model_selection, multclass, multioutput (#16982) 2020-04-24 17:24:24 -04:00
Nicolas Hug 2587a03380
[MRG] DOC fix ref for ParameterSampler (#16983) 2020-04-24 10:28:56 -04:00