Commit Graph

167 Commits

Author SHA1 Message Date
Olivier Grisel 279388d9ed
DOC Improve get_feature_names_out docstrings (#22718)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2022-03-07 13:02:12 -05:00
Guillaume Lemaitre 229bd226ab
MNT remove _pairwise attribute (#21594) 2022-02-09 16:58:01 +01:00
katotten d18018441b
DOC Ensures that sklearn.base.clone passes numpydoc validation (#21557)
* sklearn clone numpydoc validation fix

* adjusting docstring and reverting earlier unrelated change

* Update sklearn/base.py

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

* Update sklearn/base.py

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
2021-11-22 23:06:53 +01:00
Olivier Grisel 74016abcdf
More informative error message when set_params has invalid values (#21542)
* More informative error message when set_params has invalid values

* Update changelog

* Typo [ci skip]

Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>

* Typo [ci skip]

Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>

* Simpler, more efficient code

Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2021-11-03 19:32:58 +01:00
Olivier Grisel 2571cb2989
Improve validation messages with infinite data (#21219)
* Improve validation messages with infinite data

* Extend and fix validation tests

* Test and fix extended error message

* data_name => input_name

* Mention estimators that natively support missing values

* More informative error message

* cosmetic

* typo

* Fix broken tests

* Fix test_knn

* Add changelog entry

* Fix broken test for param search models

* Missing input names

* Allow Y and y in estimator checks

* Add missing input names

* Fix input_name for FunctionTransformer

* More missing input names

* Update test

* More test fixes on scores

* Simplify message to avoid to make generic fallback meaningful

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

* More informative estimator checks failure messages

* Make sure the estimator name is passed correctly in _validate_data

* Simplify calls to _validate_data

* Handle estimator name in private _check_y helper

* More specific error message

* Add estimator to check_X_params and check_y_params

* Add .. versionadded flags in public docstrings

* Update changelog

* Improve _validate_data's docstring

* Typo in doc/whats_new/v1.1.rst

* Make _check_estimator_name return None if estimator == None

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

* check_params dict updates with style

* Increase test coverage

Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-10-29 15:59:57 +02:00
Thomas J. Fan 87838c20cc
ENH Adds feature names out to decomposition module (#21334)
* ENH Adds feature names out to decomposition module

* DOC Adds whats enw

* REV Removes module not in decomposition

* ENH Uses a mixin

* REV Better merge
2021-10-27 13:08:37 +02:00
Jérémie du Boisberranger a9bf7f38d7
FIX delete feature_names_in_ when refitting on a ndarray (#21389)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-10-23 12:30:05 +02:00
Gabriel Stefanini Vicente 0b46d03951
DOC Ensures that SpectralBiclustering passes numpydoc validation (#21393) 2021-10-22 08:20:59 +02:00
Thomas J. Fan 4abd9f2d9e
API Implements get_feature_names_out for transformers that support get_feature_names (#18444)
Co-authored-by: Andreas Mueller <andreas.mueller@columbia.edu>
Co-authored-by: Andreas Mueller <andreasmuellerml@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2021-09-07 10:56:57 +02:00
Thomas J. Fan 416898b7f4
ENH Adds Column name consistency (#18010)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-08-17 14:48:21 +02:00
Alberto Rubiales 4de0c1604b
DOC BaseEstimator added url about problems to load from pickles (#20434) 2021-07-07 11:05:46 +02:00
Maxwell 2cc12c604a
DOC ensure IsolationForest passes numpydoc validation (#20437) 2021-07-06 10:59:25 +02:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Sebastian Flores 3b309f23f0
DOC Ensures that ARDRegression passes numpydoc validation (#20381)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-06-28 10:08:10 +02:00
Jesse Lima 23df3e2d55
DOC Ensures Lasso passes numpydoc validation (#20409) 2021-06-27 08:14:16 +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
Jérémie du Boisberranger 536f3ccd75
MNT Allow to only validate y in _validate_data (#20227)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-06-15 17:14:19 +02: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
Thomas J. Fan d996eaf088
ENH Adds _num_features for array-likes (#19633)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2021-03-16 15:14:25 +01: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
Juan Carlos Alfaro Jiménez 1864ed442e
MNT Raise error if parameter cannot be retrieved (#17448)
* MNT Raise error if parameter cannot be retrieved

* MNT Prefer pytest.raises over assert_raises_regex

* FIX Fix tests

* DOC Add what's new entry
2020-10-28 19:05:15 +01:00
Nicolas Hug dccaf4c867
DOC Good practices and pitfalls for random_state (#18363) 2020-10-27 11:36:55 -04:00
Thomas J. Fan e8ffa3179a
CLN Only check for n_features_in_ only when it exists (#18011)
* CLN Checks n_features_in only if it exists

* Update sklearn/base.py

Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>

* DOC Update docstring

* DOC Grammer

* Grammar [ci skip]

Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
2020-10-13 11:07:26 +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 8731cd732b
ENH Uses _validate_data in other methods in the neural_network module (#18514) 2020-10-07 11:35:47 +02:00
Guillaume Lemaitre 21569e719c
TST Common test preserve dtype (#18054)
Co-authored-by: Sebastian Kießling <sebkies@gmail.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2020-09-08 10:13:53 +02:00
Juan Carlos Alfaro Jiménez 2fa4272b1d
DOC Fix documentation of the base module (#17548)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2020-08-21 21:48:05 +02:00
Thomas J. Fan 7647ed3e77
MNT Only reset on the first call to partial_fit in birch (#18014) 2020-08-21 08:51:19 -04:00
Juan Carlos Alfaro Jiménez 6c3e17989a
DOC Specify the meaning of y=None in fit_transform (#17366) 2020-05-27 14:35:00 -07:00
Thomas J Fan 7117a63137
MNT Removes voting classifer mention (#17196) 2020-05-13 14:49:47 -04:00
brigi 865069c234
DOC Fix documentation of default values in base, birch (#16195)
* Fix documentation of default values in birch

* fix input and output description as suggested

* fix typo

Co-authored-by: Brigitte@home <unger@nue.tu-berlin.de>
2020-05-10 12:14:18 -04:00
Thomas J Fan f23b940dca
FIX Adjusts html_repr based on configuration (#17093)
* ENH Adjusts html_repr based on configuration

* CLN Returns None instead

* CLN Uses property hack

* CLN Address comments
2020-05-05 09:58:10 +02:00
Thomas J Fan ee2508ce45
ENH Adds HTML visualizations for estimators (#14180) 2020-04-30 08:31:58 +10:00
Nicolas Hug fbae1edfd8
API kwonly args in base (#17006) 2020-04-23 10:20:52 +02:00
Nicolas Hug 089c8a17a1
[MRG] MNT requires_y tag with y=None validation (#16622) 2020-04-22 22:41:45 +10:00
Nicolas Hug 2d03d781a9
MNT simplify xfail check marking logic (#16949)
Co-Authored-By: Roman Yurchak <rth.yurchak@gmail.com>
2020-04-17 13:44:09 -04:00
Nicolas Hug d205638475
MNT Introduction of n_features_in_ attr with _validate_data mtd (#16112) 2020-02-29 09:05:11 -05:00
Roman Yurchak 1c1f273d10
ENH XFAIL in common tests with estimator tags (#16502) 2020-02-20 22:28:54 +01:00
lopusz e1c7649469
DOC Cleaning parameter spec in docstrings of base module (#16284) 2020-01-31 06:43:22 -05:00
olicairns 3ae671e07b ENH Improve error message in clone when passed class instances (#16189) 2020-01-27 09:21:09 +01:00
Nicolas Hug 4256542b10 MNT Removed deprecated attributes and parameters (#15803) 2019-12-09 22:17:06 +08:00
m.fab 98cb91b545 DOC numpydoc validation for VotingClassifier (#15497) 2019-11-17 19:29:38 +01:00
Yu-Hang "Maxin" Tang 8360786895 ENH Allowing Gaussian process kernels on structured data (#15557) 2019-11-15 16:07:36 -08:00
Richard Payne 6488110706 DOC Docstring fix for DecisionTreeClassifier and DecisionTreeR… (#15483) 2019-11-05 23:36:57 +01:00
Tola A b862c2555b DOC Numpydoc validations to `MinMaxScaler` (#15448) 2019-11-04 12:03:39 +01:00
Paolo e5429cb7f1 DOC Fix docstrings to Numpy format for IsolationForest (#15454) 2019-11-02 18:53:21 +01:00
Tola A 9c2c263f9b DOC numpydoc validations for LogisticRegression (#15445) 2019-11-02 15:38:50 +01:00
Nicolas Hug e947689c90 MAINT Make files private for sklearn.metrics and sklearn.metrics.cluster (#15306) 2019-10-23 15:20:28 +02:00
Adrin Jalali 0eebade264 DOC docstring (shape= -> of shape) (#14640) 2019-10-02 20:54:32 -04:00