Commit Graph

683 Commits

Author SHA1 Message Date
Daniela Fernandes 671178e5d9
TST replace pytest.warns(None) in preprocessing/test_common.py (#22936)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-03-26 10:45:31 -04:00
Daniela Fernandes f3f8967a3d
TST replace pytest.warns(None) in test_function_transformer.py (#22937) 2022-03-24 22:07:29 +01:00
Daniela Fernandes 14a4934eb5
TST removed pytest.warns(None) in test_data.py (#22938) 2022-03-24 22:05:10 +01:00
Thomas J. Fan c3f81c1d48
FIX PowerTransformer Yeo-Johnson auto-tuning on significantly non-Gaussian data (#20653)
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
2022-03-24 17:42:02 +01:00
Thomas J. Fan 51fddb7fdc
ENH Adds encoded_missing_value to OrdinalEncoder (#21988) 2022-03-23 13:26:34 +01:00
Anne Ducout 5cccdef437
DOC Ensures that preprocessing._data.power_transform passes numpydoc validation (#22802)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-03-21 21:44:28 +01:00
Dimitri Papadopoulos Orfanos 3d4ee9e9dc
MNT Remove utf-8 encoding declarations (#21260)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-03-14 17:59:36 +01:00
Thomas J. Fan 7f0006c8aa
ENH Adds infrequent categories to OneHotEncoder (#16018)
* ENH Completely adds infrequent categories

* STY Linting

* STY Linting

* DOC Improves wording

* DOC Lint

* BUG Fixes

* CLN Address comments

* CLN Address comments

* DOC Uses math to description float min_frequency

* DOC Adds comment regarding drop

* BUG Fixes method name

* DOC Clearer docstring

* TST Adds more tests

* FIX Fixes mege

* CLN More pythonic

* CLN Address comments

* STY Flake8

* CLN Address comments

* DOC Fix

* MRG

* WIP

* ENH Address comments

* STY Fix

* ENH Use functiion call instead of property

* ENH Adds counts feature

* CLN Rename variables

* DOC More details

* CLN Remove unneeded line

* CLN Less lines is less complicated

* CLN Less diffs

* CLN Improves readiabilty

* BUG Fix

* CLN Address comments

* TST Fix

* CLN Address comments

* CLN Address comments

* CLN Move docstring to userguide

* DOC Better wrapping

* TST Adds test to handle_unknown='error'

* ENH Spelling error in docstring

* BUG Fixes counter with nan values

* BUG Removes unneeded test

* BUG Fixes issue

* ENH Sync with main

* DOC Correct settings

* DOC Adds docstring

* DOC Immprove user guide

* DOC Move to 1.0

* DOC Update docs

* TST Remove test

* DOC Update docstring

* STY Linting

* DOC Address comments

* ENH Neater code

* DOC Update explaination for auto

* Update sklearn/preprocessing/_encoders.py

Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>

* TST Uses docstring instead of comments

* TST Remove call to fit

* TST Spelling error

* ENH Adds support for drop + infrequent categories

* ENH Adds infrequent_if_exist option

* DOC Address comments for user guide

* DOC Address comments for whats_new

* DOC Update docstring based on comments

* CLN Update test with suggestions

* ENH Adds computed property infrequent_categories_

* DOC Adds where the infrequent column is located

* TST Adds more test for infrequent_categories_

* DOC Adds docstring for _compute_drop_idx

* CLN Moves _convert_to_infrequent_idx into its own method

* TST Increases test coverage

* TST Adds failing test

* CLN Careful consideration of dropped and inverse_transform

* STY Linting

* DOC Adds docstrinb about dropping infrequent

* DOC Uses only

* DOC Numpydoc

* TST Includes test for get_feature_names_out

* DOC Move whats new

* DOC Address docstring comments

* DOC Docstring changes

* TST Better comments

* TST Adds check for handle_unknown='ignore' for infrequent

* CLN Make _infrequent_indices private

* CLN Change min_frequency default to None

* DOC Adds comments

* ENH adds support for max_categories=1

* ENH Describe lexicon ordering for ties

* DOC Better docstring

* STY Fix

* CLN Error when explicity dropping an infrequent category

* STY Grammar

Co-authored-by: Joel Nothman <joel.nothman@gmail.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-03-14 15:48:18 +01:00
Magali f6d37b85d5
Changing docstring for binzrize (#22801)
Co-authored-by: Magali Morin <magali.morin@student-cs.fr>
2022-03-12 19:22:25 +01:00
Anne Ducout 6d36596c4d
fix docstrings on preprocessing._data.normalize (#22795)
Co-authored-by: ducanne <71016393+ducannelync@users.noreply.github.com>
2022-03-12 17:38:24 +01:00
sakinaOuisrani aec4eaa17b
DOC Fix docstring in quantile_transform function #21350 (#22780)
* fix: docstring in quantile_transform function

* fix: docstring quantile transformer

Co-authored-by: Sakina <s.ouisrani@sesamm.com>
2022-03-12 16:52:14 +01:00
Thomas J. Fan 36c6c74e5f
FIX Fixes KBinsDiscretizer for encode=ordinal (#22735)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-03-09 11:10:50 -08: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
Jérémie du Boisberranger 34f9dbf541
MNT Clean fixes and compat for old versions of our dependencies (#22642)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2022-03-02 11:32:06 +01:00
Meekail Zain 4d9e005811
FIX np.digitize fixes in calibration and discretization (#22526)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Andreas Mueller <andreas.mueller@columbia.edu>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-02-19 20:50:46 +01:00
shaymerNaturalint 0a01f90b92
DOC Adjusts OneHotEncoder docstring on multicollinearity (#22507)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2022-02-19 07:16:35 -05: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 1fc86b6aac
MNT Update black to stable version (#22474) 2022-02-15 11:36:26 +01:00
Thomas J. Fan 4ff0767087
ENH Better error message for check_scalar (#22218)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-02-11 16:15:30 +01:00
Guillaume Lemaitre 229bd226ab
MNT remove _pairwise attribute (#21594) 2022-02-09 16:58:01 +01:00
Thomas J. Fan d7feac0ccf
ENH Adds feature_names_out to preprocessing module (#21079)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: 赵丰 (Zhao Feng) <616545598@qq.com>
Co-authored-by: Niket Jain <51831161+nikJ13@users.noreply.github.com>
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
2022-02-07 12:09:57 +01:00
Thomas J. Fan 9f85c9d449
TST Better info when checking for no warnings in tests (#22362) 2022-02-03 11:42:48 +01:00
Behrouz B de3373b9dc
DOC correct typo in StandardScaler documentation (#21860)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-01-28 14:39:32 +01:00
pelennor 5f0a69585b
Doc fix typos in sklearn.preprocessing._encoders (#21910) 2021-12-07 14:32:43 +01:00
Aurélien Geron d23d589587
ENH Add get_feature_names_out to FunctionTransformer (#21569) 2021-11-30 13:31:17 -05:00
mandjevant 231ca9e804
DOC Various documentation improvements (#21764)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-11-26 11:11:43 +01:00
Aurélien Geron bacc91cf1d
MNT Make algorithm='auto' default to using 'full' instead of 'elkan' (#21735)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-11-25 19:16:21 +01:00
Thomas J. Fan 60cf98bc89
FIX Ignore distutils warning in [scipy-dev] + fix numpy 1.22 support in OneHotEncoder (#21517)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2021-11-04 12:17:50 +01:00
Amanda Dsouza 48e5423d74
ENH add parameter subsample to KBinsDiscretizer (#21445)
Co-authored-by: Felipe Bidu Rodrigues <felipe@felipevr.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-11-04 10:20:57 +01:00
Jérémie du Boisberranger 1f8825c8dd
MNT Centralize common cython compiler directives (#21512) 2021-11-03 13:26:23 +01:00
krumetoft c241fe7e5e
FIX validate in `fit` for `LabelBinarizer` estimator (#21434)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-11-02 11:26:02 +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
Juan Martin Loyola dfdaa45f2c
DOC Ensures that MultiLabelBinarizer passes numpydoc validation (#21315) 2021-10-20 17:27:18 +02:00
Juan Martin Loyola fe9b706368
DOC fix hyperlinkg to MultiLabelBinarizer (#21331) 2021-10-20 17:26:27 +02:00
Thomas J. Fan f3f04ed603
DOC Doc fix for one_hot_encoder (#21074) 2021-10-20 14:00:57 +02:00
Dimitri Papadopoulos Orfanos 10a5468e90
DOC Remove some str/unicode leftovers from Python 2 (#21270)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-10-08 13:55:15 +02:00
Pinky cd87551a29
DOC Ensures that SplineTransformer passes numpydoc validation (#21248)
* Remove SplineTransformer from DOCSTRING_IGNORE_LIST

* Fix numpydocs from SplineTransformer
2021-10-07 12:32:10 +02:00
Juan Martin Loyola 5ea46a5fba
DOC Ensures that PolynomialFeatures passes numpydoc validation (#21239) 2021-10-05 12:01:19 +02:00
Thomas J. Fan d1285a9232
DOC Adds missing imports into examples and test them (#21186) 2021-09-29 13:51:33 +02:00
Juan Martin Loyola 6e2388f901
DOC Ensures that RobustScaler passes numpydoc validation (#21155) 2021-09-27 10:34:03 +02:00
Dimitri Papadopoulos Orfanos f71c031314
DOC Typos found by codespell (#21069) 2021-09-17 19:04:54 +02:00
Manimaran 21fdba3bc9
DOC Ensures that QuantileTransformer passes numpydoc validation (#21065) 2021-09-16 14:00:34 +02:00
Juan Martin Loyola 8023efe0c0
DOC Ensures that Normalizer passes numpydoc validation (#21061) 2021-09-16 10:01:03 +02:00
Bharat Raghunathan 129a5d7e86
DOC Ensures that OrdinalEncoder passes numpydoc validation (#21030)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-09-14 12:08:58 +02:00
Juan Martin Loyola 597df0ad17
DOC Ensures that PowerTransformer passes numpydoc validation (#21015)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-09-13 17:46:52 +02:00
genvalen cfbaba1e61
DOC Ensures that KBinsDiscretizer passes numpydoc validation (#21016) 2021-09-13 10:55:21 +02:00
genvalen 304a5e8e16
DOC Ensures that LabelBinarizer passes numpydoc validation (#20990) 2021-09-09 11:09:37 +02:00
Thomas J. Fan ba58f3a693
BUG Fixes FunctionTransformer validation in inverse_transform (#20961) 2021-09-08 11:01:24 +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
baam 81362c2676
DOC Ensures that FunctionTransformer passes numpydoc validation (#20939) 2021-09-06 14:46:13 +02:00