Commit Graph

404 Commits

Author SHA1 Message Date
Franck Charras 77aeb825b6
FIX Apply dtype param in `check_array_api_compute_metric` unit test (#27940) 2023-12-18 16:43:08 +01: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
Guillaume Lemaitre dc2a2256ea
MAINT remove sparse parameter in OneHotEncoder (#27861) 2023-11-27 23:25:48 +01:00
Guillaume Lemaitre 0816e0012c
FIX raise NotFittedError in OrdinalEncoder when required (#27821)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-11-23 15:35:17 -05:00
Thomas J. Fan 831c49aca3
ENH Adds polars output support to `set_output` API (#27315) 2023-11-19 22:46:56 +01:00
Edoardo Abati 5cf61b21ec
ENH Add Array API compatibility to `Normalizer` (#27558) 2023-11-14 14:08:43 +01:00
Lucy Liu 926671b25b
FIX improve warning message in `_ensure_sparse_format` (#27757) 2023-11-14 11:12:56 +01:00
Xuefeng Xu a55f1673d7
FIX raise an error if user defined categories contain duplicate values (#27328)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Tim Head <betatim@gmail.com>
2023-11-01 15:29:49 +00:00
Xuefeng Xu 0efad0029b
FIX raise an error if nan is not the last element in user provided categories (#27309)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-11-01 14:59:48 +01:00
Edoardo Abati 1dd395cb85
ENH Add Array API compatibility to `KernelCenterer` (#27556) 2023-10-23 17:37:28 +02:00
Mohit Joshi 32e397553c
TST Extend tests for `scipy.sparse.*array` in `sklearn/preprocessing/tests/test_common.py` (#27164) 2023-10-02 14:07:19 +05:00
Mohit Joshi 9f6592f714
TST Extend tests for `scipy.sparse.*array` in `test_polynomial.py` (#27166)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-09-29 21:55:08 +00:00
Stefanie Senger 20dad5851e
DOC documentation and error message for mismatching output formats in transformers with a sparse output (#26919)
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-09-21 16:54:23 +02: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
Guillaume Lemaitre 0d701e8fef
MAINT use .toarray instead of .A that is deprecated (#27367)
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
2023-09-14 13:08:35 +02:00
Yao Xiao 9c46a6ce70
TST Extend tests for `scipy.sparse/*array` in `sklearn/preprocessing/tests/test_data` (#27253)
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
2023-09-13 19:27:30 +02:00
Tialo 1fffa8d94b
TST Extend tests for `scipy.sparse.*array` in `sklearn/preprocessing/tests/test_label.py` (#27227) 2023-09-13 17:50:35 +05: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
Stefanie Senger dcf88e9f6b
TST Extend tests for `scipy.sparse.*array` in `test_encoders.py` (#27289) 2023-09-07 14:54:28 +02:00
Lucy Liu 872c19effd
ENH Allows multiclass target in `TargetEncoder` (#26674)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-09-07 09:52:15 +00:00
Lucy Liu b72252e962
TST Fix typo, lint `test_target_encoder.py` (#26958)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-09-07 06:59:28 +00:00
Loïc Estève 1821c3c855
CI Fix scipy-dev issues related to numpy 2.0 changes (#27190) 2023-08-29 13:04:33 +02:00
Edoardo Abati 2efe3f3f6b
ENH Add Array API compatibility to MaxAbsScaler (#27110) 2023-08-23 16:09:28 +02:00
Tim Head 061f8777b4
ENH Add Array API compatibility to MinMaxScaler (#26243)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2023-08-18 14:39:08 +00: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
Thomas J. Fan dcf051038f
FIX Adds more informative error message for OHE (#26931) 2023-07-31 13:40:31 +02:00
Thomas J. Fan 3dea10209e
FIX Disable set_output for label encoders (#26940)
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
2023-07-31 09:02:34 +00:00
Dimitri Papadopoulos Orfanos 1ba0783f64
MAINT Fix typos found by codespell (#26852) 2023-07-18 10:20:40 +02:00
Julien Jerphanion dfd299b19e
MAINT Remove soon-to-be deprecated scipy.sparse functions (#26751) 2023-07-12 18:34:01 +02:00
Adrin Jalali 42173fdb34
MNT add isort to ruff's rules (#26649) 2023-06-21 17:50:07 +02:00
Jérémie du Boisberranger e5df5fec4d
Fix PowerTransformer leaves constant feature unchanged (#26566)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-06-14 11:36:43 +02:00
Yao Xiao 18cf8d01ea
FIX `PowerTransformer` raise when "box-cox" has nan column (#26400)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-06-13 17:30:11 +00:00
Christian Lorentzen e5c65906ee
ENH add sparse output to SplineTransformer (#24145)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-06-05 15:04:34 +02:00
Jérémie du Boisberranger 199cdfd768
ENH Change default value of subsample + allow for all strategies in KBinsDiscretizer (#26424)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-05-31 18:06:11 -04:00
Dimitri Papadopoulos Orfanos 2fd022d972
MAINT Fix typos found by codespell (#26448) 2023-05-31 10:19:21 +02:00
Julien Jerphanion 41b0bd82ff
MAINT Use `scipy.sparse.isspmatrix_*` (#26420) 2023-05-30 13:46:32 -04:00
Meekail Zain c6628a0e7a
ENH Allow for appropriate dtype us in `preprocessing.PolynomialFeatures` for sparse matrices (#23731)
Co-authored-by: Aleksandr Kokhaniukov <alexander.kohanyukov@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2023-05-04 21:30:49 +02:00
2357juan b2c388147c
MAINT Parameters validation for sklearn.preprocessing.quantile_transform (#26144)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2023-04-19 16:35:46 +00:00
Adrin Jalali 893d5accaf
MNT Update black to 23.3.0 (#26110) 2023-04-06 12:14:16 -04:00
Jiawei Zhang fb526710b6
MAINT Parameters validation for sklearn.preprocessing.normalize (#26069)
Co-authored-by: jeremiedbb <jeremiedbb@yahoo.fr>
2023-04-04 13:50:01 +00:00
Thomas J. Fan 7df7062a7a
ENH Adds infrequent categories support to OrdinalEncoder (#25677)
Co-authored-by: Tim Head <betatim@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Andreas Mueller <t3kcit@gmail.com>
2023-03-29 10:08:25 +02:00
Thomas J. Fan 65dfab01cd
FIX Fixes pandas extension arrays in check_array (#25813) 2023-03-22 17:41:32 +01:00
Thomas J. Fan 392fdee003
ENH Adds TargetEncoder (#25334)
Co-authored-by: Andreas Mueller <t3kcit@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Jovan Stojanovic <62058944+jovan-stojanovic@users.noreply.github.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2023-03-16 16:59:20 +01:00
Thomas J. Fan 1380e3c09b
FIX Fixes bug OneHotEncoder's drop_idx_ when there are infrequent categories (#25589)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2023-03-08 13:17:51 +01:00
Thomas J. Fan ae4a1b1a78
FIX Allow OrdinalEncoder's encoded_missing_value set to the cardinality (#25704) 2023-02-28 11:15:08 +01:00
Thomas J. Fan 6671d604aa
ENH Allows target to be pandas nullable dtypes (#25638) 2023-02-24 00:09:47 +01:00
Thomas J. Fan 55eaa4ba5c
FIX SplineTransformer.get_feature_names_out returns correct names for extrapolations=periodic (#25296)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2023-01-18 18:25:33 +00:00
Mario Kostelac 3bc36e000d
ENH Add feature_name_combiner to OneHotEncoder (#22506)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
2023-01-12 11:20:26 +01:00
Gleb Levitski cde6d65794
ENH KBinsDiscretizer sample_weight support for kmeans strategy (#25257) 2023-01-03 11:38:34 -08: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