Commit Graph

170 Commits

Author SHA1 Message Date
Thomas J. Fan 51fddb7fdc
ENH Adds encoded_missing_value to OrdinalEncoder (#21988) 2022-03-23 13:26:34 +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
puhuk 337e0d234b
DOC Use :doi: and :arxiv: directives for references (#21099) 2021-10-20 13:53:25 -04:00
Olivier Grisel 45bb9ab916
DOC new example on feature engineering for cyclic time features (#20281)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2021-07-26 11:02:49 +02:00
Guillaume Lemaitre 6a562d31e4
ENH improve KernelCenterer documentation and tests (#19901)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Sylvain Marié <sylvain.marie@schneider-electric.com>
2021-04-27 17:45:20 +02:00
Thomas J. Fan c9c89cfc85
ENH Adds support for drop + handle_unknown=ignore in the OneHotEncoder (#19041)
Co-authored-by: Olivier Grisel <olivier.grisel@gmail.com>
2021-03-31 16:45:38 +02:00
Thomas J. Fan 638b7689bb
ENH Adds nan passthrough in OrdinalEncoder (#19069) 2021-02-24 17:23:44 +11:00
Olivier Grisel 43241b1979 DOC fix missing closing quote in user guide 2021-02-19 11:41:29 +01:00
Christian Lorentzen 27f1c737f2
FEA Add SplineTransformer (#18368) 2021-01-24 10:53:27 +01:00
Maxime Prieur 58f91434f8
DOC explain how to use custom edge bins in KBinsDiscretizer (#18972)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2020-12-15 20:01:17 +01:00
Oleh Kozynets 160debe468
DOC remove mentions of preprocessing functions in the user guide (#18327) 2020-10-20 18:20:48 +02:00
Thomas J. Fan eeddc17a85
ENH Adds missing value support to OneHotEncoder (#17317)
OneHotEncoder supports categorical features with missing values by
considering the missing values as an additional category.
2020-10-09 08:38:33 +02:00
Maren Westermann 70e1558607
DOC shorten links in doc/* modules (#17820)
* shorten links in doc modules

* fix links

* implement suggested changes

* try to fix links with tilde sign

* change back broken links in computing.rst and try make link in faq.rst work

* implement reviewer's suggested changes
2020-08-21 14:31:41 +02:00
Thomas J. Fan 6195a16505
DOC Removes FunctionTransformer example (#17318)
* DOC Removes FunctionTransformer example

* DOC Updates description
2020-06-25 14:27:38 +02:00
Guillaume Lemaitre db85b1264c
DOC improve the documentation of OneHotEncoder for if_binary (#16428) 2020-02-11 18:31:42 +01:00
Johann Faouzi da31c8188d DOC Fix typo in Yeo-Johnson formula (#15280) 2019-10-17 09:01:00 -04:00
Kanika Sabharwal 40c7978a64 use return_X_y=True for load_iris dataset (#14777) 2019-08-24 17:54:16 -04:00
Johann Faouzi 3e22c22818 DOC Use LaTeX for phi in KernelCenterer user manual (#14245) 2019-08-01 11:11:53 +02:00
Rajat Garg 3963d948d1 DOC Normalization is aka spatial sign preprocessing (#12511) 2019-07-03 10:52:55 +02:00
Thomas J Fan 2e7e06b78f [MRG] Doctest with print change only adjusts default options for doctest (#13991) 2019-06-01 10:53:45 +02:00
Guillaume Lemaitre 9ee164baa3 [MRG] DEP remove legacy mode from OneHotEncoder (#13855) 2019-05-29 21:03:29 +10:00
Albert Thomas 2ad8735c50 FIX set n_quantiles to min(n_samples, n_quantiles) in QuantileTransformer (#13333) 2019-03-01 11:23:56 +01:00
Albert Thomas 0f09297cde ENH: simplify transform for uniform output in QuantileTransformer (#12827) 2019-02-26 17:53:38 +01:00
drewmjohnston 350cd4aefa ENH: Add Drop Option to OneHotEncoder. (#12908) 2019-02-26 13:50:21 +01:00
Christos Aridas eb800524dd DOC Correct word in preprocessing [ci skip] (#13216) 2019-02-21 13:53:43 -08:00
Hanmin Qin 09bc27630f DOC Formatting issue in preprocessing.rst 2019-02-21 21:56:21 +08:00
Hanmin Qin ff28c42b19 DOC Wrong statement about KBinsDiscretizer 2019-02-14 22:58:52 +08:00
Nicolas Hug a50c03f975 [MRG] Add pprint for estimators - continued (#11705)
* add pprint for estimators

* strip color from length, add color option

* Minor cleaning, fixes, factoring and docs

* Added some basic tests

* Fixed line length issue

* fixed flake8 and added visual test for review

* Fixed test

* Fixed Python 2 issues (inspect.signature import)

* Trying to fix flake8 again

* Added special repr for functions

* Added some other visual tests

* Changed _format_function in to _format_callable

because callable() returns True also for class objects (which we want to
reprensent with their name as well anyway)

* Consistent output in Python 2 and 3

* WIP

* Now using the builtin pprint module

* pep8

* Added changed_only param

* Fixed printing when string would fit in less than line width

* Fixed printing of steps parameter

* Fixed changed_only param for short estimators

* fixed pep8

* Added some more description in docstring

* changed_only is now an option from set_config()

* Put _pprint.py into sklearn/utils, added tests

* Added doctest NORMALIZE_WHITESPACE where needed

* Fixed tests

* fix test-doc

* fixing test that passed before....

* Fixed tests

* Added test for changed_only and long lines

* typo

* Added authors names

* Added license file

* Added ellipsis based on number of elements in sequence + added increasinly aggressive repr strategies

* Updated whatsnew

* dont use increaingly aggressive strategy

* Fixed tests

* Removed LICENSE file and put license text in _pprint.py

* fixed test_base

* Sorted parameters dictionary for consistent output in 3.5

* Actually using OrderedDict...

* Addressed comments

* Added test for NaN changed parameter

* Update whatsnew

* Added example to set_config()

* Removed example

* Added example in gallery

* Spelling
2018-12-19 23:48:21 -05:00
Joel Nothman 8e0802813f DOC Move 'for instance' to front 2018-10-04 20:36:34 +10:00
Joel Nothman 5e24762322 DOC add note on discretization creating non-linearity (#12269) 2018-10-04 15:50:09 +08:00
Nicolas Hug 2d232acdeb [MRG] Add Yeo-Johnson transform to PowerTransformer (#11520) 2018-07-20 22:32:12 +02:00
Andreas Mueller 6ecb98eea3 doctest errors "fixed" by skipping 2018-07-17 18:08:42 -05:00
Andreas Mueller b25e222328 MNT misc sphinx website build fixes and dead links (#11532) 2018-07-16 09:13:20 +08:00
Joel Nothman 40d1f00c82 Merge branch 'master' into discrete 2018-07-10 09:46:03 +10:00
Tom Dupré la Tour 5a61af94e2 [MRG+2] Implement two non-uniform strategies for KBinsDiscretizer (discrete branch) (#11272) 2018-07-10 09:29:56 +10:00
Andreas Mueller eec7649236 MAINT Complete 0.20 deprecations (#9570) 2018-06-24 23:06:26 +10:00
Joris Van den Bossche 007aa710bd FEA Refactor CategoricalEncoder into OneHotEncoder and OrdinalEncoder (#10523)
Deprecated some OneHotEncoder behaviour
2018-06-21 19:27:41 +10:00
Hanmin Qin 9603c3fb30 doc test 2018-06-04 23:45:30 +08:00
Hanmin Qin 0be6e848da doc test 2018-06-04 22:33:55 +08:00
Joel Nothman f737fe6af3
Merge branch 'master' into discrete 2018-05-30 12:56:45 +10:00
Loïc Estève 20661b5018
TST: only run doctests on numpy 1.14. (#10835)
Fix doctests due to numpy 1.14 formatting changes.
2018-03-27 07:44:40 +02:00
Kumar Ashutosh 94ed5a88bd DOC Removes Imputer References from docs (#10750) 2018-03-13 23:48:26 +08:00
Hanmin Qin 98eb09e920
Revert #10558 Deprecate axis parameter in imputer (#10635) 2018-02-14 18:55:03 +08:00
Hanmin Qin 52aaf82692 [MRG+1] Deprecate axis parameter in imputer (#10558) 2018-02-08 17:45:32 +11:00
Eric Chang d8483dfee0 [MRG+1] ENH Add standardize flag to PowerTransformer (#10316) 2017-12-14 11:22:27 +01:00
Hanmin Qin ef57c34919
Merge branch 'master' into discrete 2017-12-06 14:21:49 +08:00
Eric Chang 62e9bb8def Feature: Implement PowerTransformer (#10210) 2017-12-06 08:29:10 +11:00
Hanmin Qin 070c9695fd Merge branch 'master' into discrete 2017-11-30 14:38:28 +08:00
Joel Nothman 6f077a6c57 DOC clearer wording in QuantileTransformer user guide 2017-11-28 09:36:42 +11:00
Hanmin Qin 4e60a3d33f drop duplicate section 2017-11-24 09:15:17 +08:00