Commit Graph

197 Commits

Author SHA1 Message Date
Guillaume Lemaitre c08afded99
MAINT remove deprecated base_estimator and base_estimator_ (#27826) 2023-11-24 13:27:02 -05:00
Riccardo Cappuzzo 458c55827a
ENH improve visual HTML estimator representation (#26616)
Co-authored-by: ines.ibnukhsein <ines.ibnukhsein@dataiku.com>
Co-authored-by: Gael Varoquaux <gael.varoquaux@normalesup.org>
Co-authored-by: Ines <ines-99@ukr.net>
Co-authored-by: Lilian <lilian@boulard.fr>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Tim Head <betatim@gmail.com>
2023-10-25 08:38:12 +02:00
Adrin Jalali b004f3ad26
ENH warn if {transform, predict} consume metadata but no custom fit_{transform, predict} is defined (#26831)
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
2023-07-14 17:46:19 +05:00
Adrin Jalali ba6896ec36
FIX clone to handle dict and GridSearchCV changing original params (#26786)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2023-07-13 16:16:29 -05:00
Guillaume Lemaitre 5d145bf760
DOC fixes intersphinx warnings (#26779)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2023-07-10 20:25:35 +00:00
Adrin Jalali 42173fdb34
MNT add isort to ruff's rules (#26649) 2023-06-21 17:50:07 +02:00
Adrin Jalali 4163b32ca9
ENH make fit_transform and fit_predict composite methods (SLEP6) (#26506)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-06-21 13:49:24 +00:00
Jérémie du Boisberranger 9c266cf5d6
MAINT Param validation: decorate all estimators with _fit_context (#26473) 2023-06-14 16:52:35 +02:00
Adrin Jalali 62671a704f
FEAT SLEP006: metadata routing infrastructure (#24027)
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Benjamin Bossan <BenjaminBossan@users.noreply.github.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
2023-06-02 16:43:31 -04:00
Jérémie du Boisberranger 12847675b3
ENH Generally avoid nested param validation (#25815)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-05-24 16:17:00 +00:00
Thomas J. Fan 948b49d8de
CLN Clean up logic in validate_data and cast_to_ndarray (#26300) 2023-05-04 13:34:16 +02:00
Adrin Jalali 893d5accaf
MNT Update black to 23.3.0 (#26110) 2023-04-06 12:14:16 -04:00
Christian Veenhuis 610a0ce970
DOC unify usage of 'w.r.t.' (#25683) 2023-02-24 09:51:02 +01:00
Thomas J. Fan 677a4cfef6
ENH Preserve DataFrame dtypes in transform for feature selectors (#25102) 2023-02-19 19:25:29 +01:00
Tim Head 32ad4b7405
FIX Enable setting of sub-parameters for deprecated base_estimator param (#25477) 2023-02-09 12:22:20 +00:00
Thomas J. Fan 3f82f84059
ENH Introduces the __sklearn_clone__ protocol (#24568) 2023-01-19 17:40:16 +01:00
Thomas J. Fan 70c690ebdd
ENH Adds InconsistentVersionWarning when unpickling version doesn't match (#25297)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-01-12 10:32:23 +01:00
John Pangas 35b5ee6577
ENH Raise NotFittedError in get_feature_names_out for estimators that use OnetoOneFeatureMixin (#25294) 2023-01-05 15:47:49 +01:00
Guillaume Lemaitre f30d35befd
Revert "ENH added original version of pickled estimator in state dict" (#25279) 2023-01-03 10:33:15 -05:00
Edern affaa62b1d
ENH added original version of pickled estimator in state dict (#22094)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-12-28 18:52:46 +00:00
Benjamin Bossan 9017c70183
FIX fix pickling for empty object with Python 3.11+ (#25188)
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>

Python 3.11 introduces `__getstate__` on the `object` level, which breaks our existing `__getstate__` code for objects w/o any attributes. This fixes the issue.
2022-12-16 11:52:29 +00:00
Thomas J. Fan 1dc23d7a1a
ENH Makes OneToOneFeatureMixin and ClassNamePrefixFeaturesOutMixin public (#24688)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-10-18 23:20:17 +02:00
Thomas J. Fan d4306ba9aa
DOC Improve docstring around set_output (#24672)
* DOC Improve docstring around set_output

* DOC Improve docs around set_output

* DOC Address comments

* DOC Better grammar

* DOC Improve wording

* DOC Improves docstring in set_config
2022-10-18 16:38:50 -04:00
Jérémie du Boisberranger 04d0e4a388
MAINT Clean deprecation for 1.2: feature names exact match (#24660) 2022-10-14 15:59:59 +02:00
Thomas J. Fan 2a6703d9e8
ENH Introduces set_output API for pandas output (#23734)
* Introduces set_output API for all transformers

* TransformerMixin inherits from _SetOutputMixin

* Adds tests

* Adds whatsnew

* Adds example on using set_output API

* Adds developer docs for set_output
2022-10-13 00:19:12 +02:00
Henry Sorsky 626b4608d4
FIX Allow `BaseEstimator.get_params` to handle `type` type params (#24017)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2022-07-29 11:11:32 +02:00
Lucy Liu c63e38add5
MNT Move base._pprint into model_selection._split (#23883) 2022-07-15 10:06:53 -07:00
David Poznik bd196eb094
Update model persistence URL (#23402) 2022-05-18 17:28:08 +02:00
Jérémie du Boisberranger 2b09fa0103
MAINT Common parameter validation (#22722)
* common parameter validation

* black

* cln

* wip

* wip

* rework

* renaming and cleaning

* lint

* re lint

* cln

* add tests

* lint

* make random_state constraint

* lint

* closed positional

* increase coverage + validate constraints

* exp typing

* trigger ci ?

* lint

* cln

* rev type hints

* cln

* interval closed kwarg only

* address comments

* address comments + more tests + cln + improve err msg

* lint

* cln

* cln

* address comments

* address comments

* lint

* adapt or skip new estimators

* lint

Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
2022-05-16 13:55:01 +02:00
avm19 7190f2c91c
FIX trigger condition of one part of a warning from check_feature_names (#23091) 2022-04-09 23:17:32 +02:00
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