Commit Graph

40 Commits

Author SHA1 Message Date
Patrick Wang 3fa732bb72
FIX Do not warn when using polars DataFrames in DecisionBoundaryDisplay.from_estimator (#28718)
Co-authored-by: jeremie du boisberranger <jeremiedbb@yahoo.fr>
Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
2024-04-10 15:24:05 +02:00
Guillaume Lemaitre 02fee0a23c
FIX FunctionTransformer overwrite column names if not consistent (#28241) 2024-02-01 18:09:50 +00:00
Guillaume Lemaitre d797b771f1
FIX warn when requested polars DataFrame but no column names are found (#28263)
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
2024-01-30 17:27:12 +00:00
Guillaume Lemaitre 1471fa7c58
FIX ensure consistency or column and feature names in FunctionTransformer (#27801)
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
2023-12-02 00:13:14 +01:00
Thomas J. Fan 89ea028ebd
ENH Improve warnings if func returns a dataframe in FunctionTransformer (#26944)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-09-19 19:10:38 +02:00
Yao Xiao d756290127
TST Extend tests for `scipy.sparse/*array` in `sklearn/preprocessing/tests/test_function_transformer` (#27254) 2023-09-13 14:06:12 +05:00
Tim Head 1b0a51bd90
Add tests for train_test_split with Array API input (#26855)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2023-08-09 18:27:31 +00:00
Adrin Jalali 42173fdb34
MNT add isort to ruff's rules (#26649) 2023-06-21 17:50:07 +02:00
Thomas J. Fan 8d74f16582
FIX Handles all numerical DataFrames with check_inverse=True in FunctionTransformer (#25274)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2023-01-03 16:46:22 +01: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
Thomas J. Fan 0189df3ffd
ENH Always set input feature attributes in FunctionTransformer (#23993) 2022-09-09 16:53:39 +02:00
Stefanie Molin b85f799d0a
MAINT Add parameter validation for `FunctionTransformer`. (#24180)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-08-31 00:06:20 +02:00
Daniela Fernandes f3f8967a3d
TST replace pytest.warns(None) in test_function_transformer.py (#22937) 2022-03-24 22:07:29 +01:00
Maxwell dbcd4d5f39
FIX FunctionTransformer check_input fails for object type input (#19916)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2022-02-17 10:16:56 -05:00
Thomas J. Fan 9f85c9d449
TST Better info when checking for no warnings in tests (#22362) 2022-02-03 11:42:48 +01:00
Aurélien Geron d23d589587
ENH Add get_feature_names_out to FunctionTransformer (#21569) 2021-11-30 13:31:17 -05:00
Thomas J. Fan ba58f3a693
BUG Fixes FunctionTransformer validation in inverse_transform (#20961) 2021-09-08 11:01:24 +02: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 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
LSturtew 3e45aeef90
TST Remove assert warn from preprocessing tests (#19691) 2021-03-20 10:07:09 -04:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00
Nicolas Hug f3eb9d2206 [MRG] MNT removing assert_equal, etc -- continued (#14232) 2019-07-02 14:53:51 +10:00
Adrin Jalali 19c068a2ec MNT towards removing assert_equal, etc (#14222) 2019-07-01 09:13:32 -04:00
Guillaume Lemaitre 76ce7c5b63 DEP change default validate in FunctionTransformer to False(#13817) 2019-06-13 12:06:01 -04:00
Hanmin Qin 575064b8e1
MNT More clean up after we remove python < 3.5 (#13078) 2019-02-02 22:01:13 +08:00
Andreas Mueller 0f94f2962b
MNT simple deprecations and removals for 0.21 (#12238)
Part of #11992.
These were all the things that seemed pretty straight-forward. It's actually a bit bulky but should still be easy to review, hopefully.
2018-10-11 14:56:37 -04:00
Andreas Mueller b9330d96c9 pep8 whoops 2018-07-17 17:00:41 -05:00
Andreas Mueller 8e2c2aa35d
raise DeprecationWarnings and FutureWarnings as errors (#11570)
Towards #11252.
In the end we'd like to make these errors so we can keep this cleaner in the future.
2018-07-17 15:31:45 -05:00
Guillaume Lemaitre a2b56453e2 ENH Passthrough DataFrame in FunctionTransformer (#11043) 2018-07-10 17:48:03 +08:00
Guillaume Lemaitre 8472350e5c [MRG + 1] ENH add check_inverse in FunctionTransformer (#9399)
* EHN add check_inverse in FunctionTransformer

* Add whats new entry and short narrative doc

* Sparse support

* better handle sparse data

* Address andreas comments

* PEP8

* Absolute tolerance default

* DOC fix docstring

* Remove random state and make check_inverse deterministic

* FIX remove random_state from init

* PEP8

* DOC motivation for the inverse

* make check_inverse=True default with a warning

* PEP8

* FIX get back X from check_array

* Andread comments

* Update whats new

* remove blank line

* joel s comments

* no check if one of forward or inverse not provided

* DOC fixes and example of filterwarnings

* DOC fix warningfiltering

* DOC fix merge error git
2017-10-25 16:49:28 -04:00
Sebastin Santy dc43486806 Remove unused imports (#9235) 2017-07-01 05:57:54 -07:00
(Venkat) Raghav, Rajagopalan 763d93b72e [MRG+1] Do not transform y (#9180)
* we do not transform y

* more

* added Deprecation Warning to transform() to remove Y parameter

* more

* ENH ensure FunctionTransformer's transform/inverse_transform doesn't permit y

* Undo changes to pls_. It will be done in a separate PR (see #9160)

* flake8

* Update whatsnew

* Fully undo PLS changes
2017-06-22 23:24:12 +02:00
Konstantin Podshumok 9b2aac9e5c [MRG + 1] [TST] (half-cosmetic) use less nose.tools import to simplify future transition to py.test (#7384)
* use less nose.tools import to simplify future transition to activly developing test suites/runners

* assert_equal -> assert_array_equal in test_feature_hasher_pairs_with_string_values

and one missed ImportError that should be replaced with AttributeError

* test for py2.6 compat with except AttributeError

* fix importing of SkipTest

* force using nose in python2.6 for now

* there was no assert_dict_equal in py2.6. but we can use assert_equal

although failed test will look a little bit ugly

* remove nose imports from doc/datasets
2016-10-07 12:46:52 -04:00
ningchi 1d487fb550 [MRG+1] issue #6532 Add `inverse_transform` function (#6570)
* [MRG+1] #6532 Add inverse_func argument to FunctionTransformer


* modify test:inverse_func is not true inverse
2016-04-12 01:26:30 -04:00
Gael Varoquaux 317dea8a05 Merge pull request #6005 from seales/SpellingFix
[MRG+1] General spelling fixes
2016-01-04 13:42:20 +01:00
Brian McFee 318b93d2ae Implemented keyword arguments in FunctionTransformer 2015-12-19 23:00:35 -05:00
seales 0485ada58b General spelling fixes 2015-12-16 09:46:42 -08:00
Lars Buitinck b09afb08be DOC/MAINT final touches to FunctionTransformer
* copyedit doc
* give the module an underscore (we should do this to all private modules...)
* use public import path in test
* change all logs to log1p to prevent warning in test and because it's
  genuinely useful for frequency data
* what's new
2015-08-03 22:12:19 +02:00
Joe Jevnik ba44e7bcc3 COMPAT: Makes test_function_transformer py2 compatible. 2015-08-03 11:45:16 -04:00
Andreas Mueller 9d14f7352e ENH: Renames CallableTransformer -> FunctionTransformer.
Makes `pass_y` an argument to FunctionTransformer to indicate that the
labels should be passed to the wrapped function.
2015-08-03 11:45:16 -04:00