Commit Graph

390 Commits

Author SHA1 Message Date
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
Tim Head ecb9a70e82
FIX Ensure dtype of categories is `object` for strings in `OneHotEncoder` (#25174)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2022-12-22 12:32:07 -05:00
Dea María Léon 1f3c1be77a
ENH add support for sample_weight in KBinsDiscretizer with strategy="quantile" (#24935)
Co-authored-by: seladus <clement.blancovolle@insa-rouen.fr>
Co-authored-by: Seladus <71873495+Seladus@users.noreply.github.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-12-13 17:11:47 +01:00
Thomas J. Fan 9c4f023528
FIX Improves nan support in LabelEncoder (#22629) 2022-10-28 08:32:09 +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
Jérémie du Boisberranger 2708aac034
MAINT Clean deprecation for 1.2: get_feature_names (#24395)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2022-10-03 09:46:10 +02:00
Rushil Desai 7134e4183c
API Rename OneHotEncoder option sparse to sparse_output (#24412)
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-09-16 13:46:53 +02:00
Thomas J. Fan 0189df3ffd
ENH Always set input feature attributes in FunctionTransformer (#23993) 2022-09-09 16:53:39 +02:00
Jérémie du Boisberranger b4f51fd156
MAINT Clean deprecation for 1.2: n_features_ replaced by n_featues_in_ (#24388) 2022-09-08 11:15:06 -04: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
Jérémie du Boisberranger f96da4076d
ENH Param validation: Introduce Options constraint (#24048) 2022-08-30 10:35:48 -04:00
Xiao Yuan e36a1b366f
DOC Fix some typos (#24300) 2022-08-29 12:17:46 -04:00
Stefanie Molin ca4e076eaa
MAINT Add parameter validation to `PolynomialFeatures` (#24214) 2022-08-29 09:35:06 -04:00
Kendall c01fad4fb4
MAINT add parameters validation for SplineTransformer (#24057) 2022-08-26 12:18:37 -04:00
Thomas J. Fan 6894a9be37
FIX Fixes OrdinalEncoder.inverse_tranform nan encoded values (#24087) 2022-08-05 09:11:39 +02:00