Commit Graph

61 Commits

Author SHA1 Message Date
Albert Villanova del Moral 7e545e1724
DOC Fix versionadded for 0.23 (#18522) 2020-10-05 10:23:32 +11:00
Nicolas Hug 4aada4e5fd
ENH Support unknown_value=np.nan in OrdinalEncoder (#18406) 2020-09-23 12:57:31 +02:00
Albert Villanova del Moral 647fcb1ac1
DOC Fix A to uppercase in See Also docstring section (#18332) 2020-09-04 10:35:01 -04:00
Nicolas Hug c3effe4bea
DOC minor typo fix (#18119) 2020-08-07 10:01:00 -04:00
Felix Wick 8a213df98f
FEA allow unknowns in OrdinalEncoder transform (#17406) 2020-08-05 18:49:25 +10:00
Juan Carlos Alfaro Jiménez 547ead6c0c
MNT More replacements of numpy aliases with built-in types (#17707)
* MNT More replacements of numpy aliases with built-in types [scipy-dev]

* MNT More (manual) replacements of numpy aliases

* MNT More (manual) replacements of numpy aliases

* FIX Minor change

* MNT Trigger build [scipy-dev]

* FIX Minor change

* MNT Trigger build [scipy-dev]

* FIX More deprecations of numpy aliases [scipy-dev]

* MNT Silent numpy aliases warnings [scipy-dev]

* FIX Fix silent deprecations

* Trigger build [scipy-dev]

* FIX Add scape characters [scipy-dev]

* FIX Remove package specification from silent

* Trigger build [scipy-dev]

* Revert
2020-06-26 12:45:03 +02:00
Thomas J. Fan 7cc0177f8e
MNT Replaces numpy alias with builtin typse (#17687)
* MNT Replaces numpy alias with builtin typse

* STY Lint error
2020-06-24 16:51:51 +02:00
Saurabh Jain 00bc681e10
DOC shorten class links in docstring using tilde (#17470)
* added tilde to bunch of files

* Updated _kde.py

Changed array_like to array-like

* Updated _kde.py

Removed space

* updated _kde.py

Added full stop

* PEP8

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2020-06-16 10:44:13 +02:00
Thomas J Fan d40d993199
CLN Refactors _encode into two functions (#17101) 2020-05-12 14:23:00 -04:00
Ekaterina Borovikova 4755ae76d2
DOC Add versionchanged and versionadded for v0.20 (#16199)
Co-Authored-By: Adrin Jalali <adrin.jalali@gmail.com>
Co-Authored-By: Chiara Marmo <cmarmo@users.noreply.github.com>
Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>
2020-04-26 09:29:36 -04:00
Thomas J Fan e54cd3c061
API Deprecate positional arguments in preprocessing (#16996)
* API Deprecate positional arguments in preprocessing

* CLN Address comments

* CLN Uses classes as a keyword only argument

* BUG Fix
2020-04-23 19:10:49 +02:00
Roman Yurchak 75d3f29e72
MAINT Remove outdated numpy and scipy backports (#16725)
* Remove unecessary numpy & scipy backports

* More fixes

* Remove unused imports
2020-03-20 13:57:18 +01:00
Olivier Grisel 6ee1597650
DOC Add note on bias induced by dropping categories in OneHotE… (#16679) 2020-03-13 10:25:09 -04:00
Chiara Marmo f763c614f4
ENH Add check for non binary variables in OneHotEncoder. (#16585)
Co-authored-by: Thomas J Fan <thomasjpfan@gmail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2020-03-10 09:58:55 +01:00
Guillaume Lemaitre db85b1264c
DOC improve the documentation of OneHotEncoder for if_binary (#16428) 2020-02-11 18:31:42 +01:00
Rushabh Vasani 7e7e115296
ENH Add 'if_binary' option to drop argument of OneHotEncoder (#16245) 2020-02-07 10:18:26 +01:00
Thomas J Fan 69884d5fd2 ENH: Improves speed of one hot encoding (#15762) 2019-12-04 15:53:15 +01:00
Paula ff878d60aa DOC add versionadded to OneHotEcoder, LabelEncoder (#15506)
and OrdinalEncoder
2019-11-15 22:01:55 +01:00
Soumirai 968a67e79f DOC numpydoc validation for OneHotEncoder and OrdinalEncoder (#15446) 2019-11-02 16:15:02 +01:00
Venkatachalam N 692c2f286e EXA Improving the example for get_feature_names in OneHotEncoder (#15369) 2019-10-28 11:48:07 +08:00
Thomas J Fan 15d5ef04df MNT Make modules private in preprocessing (#15323) 2019-10-22 11:37:05 +08:00
Andreas Mueller 03ea20db0f Fix mixin inheritance order, allow overwriting tags (#14884) 2019-09-05 10:13:30 +02:00
Adrin Jalali f749bed458 [MRG] DOC clarify LabelEncoder's docstring (#14642) 2019-08-15 07:48:04 +10:00
Andreas Mueller 92af3dabbb MAINT simplify check_is_fitted to use any fitted attributes (#14545) 2019-08-13 22:09:07 +02:00
krishna katyal c2d5cba19d DOC improve OneHotEncoder's docstring (#14396) 2019-07-22 10:41:48 -07:00
Thomas J Fan 0bdd92036d [MRG] MAINT Adds tag categorical to OneHotEncoder (#14068) 2019-06-24 22:42:05 +10:00
Roman Yurchak ccd3331f7e MNT remove unused imports (#14021) 2019-06-04 23:15:19 +10: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
James Myatt e35f040200 [MRG] Fixes get_feature_names results when using drop functionality (#13894) 2019-05-23 14:39:39 +02:00
Nicolas Hug 911792b008 ENH Avoid calling _encode_check_unknown() twice in BaseEncoder.transform (#13810) 2019-05-22 09:43:40 +10:00
Paresh Mathur ea58e27ace DOC Documentation improvement in fbeta_score and OneHotEncoder (#13904) 2019-05-20 10:30:10 +08:00
Nicolas Hug 83dca7eb1b MNT Correctly handle deprecated attribute warnings and docstrings (#13635) 2019-04-18 10:21:40 -07:00
Mohammad Aftab c3731f524c MNT Updated error message to remove deprecated n_values (#13454) 2019-03-22 08:34:53 +11:00
Joris Van den Bossche afd432137f
CLN: remove duplicate validation of X in Encoders transform (#13347) 2019-03-02 09:45:49 +01:00
Roman Yurchak cf9a740598 [MRG+1] Use astype(.., copy=False) when possible (#11973)
* Use astype(.., copy=False) when possible

* Use Use astype(.., copy=False) also in tests

* Fix CI

* Guillaume's comments

* Address review comments

* Add what's new

* Fix CI

* Lint

* Fix merge issues

* More merge conflict fixes

* Fix failing test

* Lint

* Use copy=True in cluster/hierarchical

* More fixes
2019-03-01 11:07:10 +01:00
maikia b2344a4e3f ENH: process DataFrames in OneHot/OrdinalEncoder without converting to array #12147 (#13253) 2019-03-01 11:02:57 +01:00
Joris Van den Bossche 20f64eb111 MNT Follow force_all_finite for object dtype in check_array (#13254) 2019-03-01 07:02:37 +01:00
drewmjohnston 350cd4aefa ENH: Add Drop Option to OneHotEncoder. (#12908) 2019-02-26 13:50:21 +01:00
Andreas Mueller ab2f539a32 API: Estimator tags (#8022) 2019-02-23 22:54:41 +01:00
surgan12 62d2059804 MNT remove __future__ imports (#12791) 2019-02-02 22:05:06 +08:00
Joris Van den Bossche fce73db57a FIX deprecation handling in OneHotEncoder for categorical_features + handle_unknown='ignore' case (#12923) 2019-01-15 16:34:55 +11:00
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02: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
Gabriel Marzinotto 62117f482e Bug with string dtype in OneHotEncoder with handle_unknown='ignore' (#12471)
* fix decisionTree issue #12259

* merge splitters

* fix decisionTree issue #12259

* merge splitters

* relaunch tests

* fix for ohe string sizes

* reverse tree changes because not done yet

* error with file

* pylinting

* add regression test and check if categories are strings before casting to object

* pylint

* pylint

* another posibility to handle the strings

* pylint

* pylint

* pylint

* add issue reference and explain the test

* handle object case

* update master test

* update master test

* Update _encoders.py

pylint

* Update test_encoders.py

* Update test_encoders.py

* Update _encoders.py

* Update _encoders.py

* fix checking for object type

* fix checking for object type

* fix checking for object type

* fix checking for object type

* fix encoder

* change check encoder

* add note in whats new
2018-11-18 14:59:07 -05:00
Dillon Gardner 2afee939df FIX incorrect error when OneHotEncoder.transform called prior to fit (#12443) 2018-11-13 09:49:53 +11:00
Andreas Mueller eb36e4905a MNT Don't change self.n_values in OneHotEncoder.fit (#12286) 2018-11-11 16:41:30 +08:00
Matthew Roeschke 5af272ac61 MNT Remove unused variables (#12230) 2018-10-22 12:48:40 +11:00
Cheuk Ting Ho f5ef674f3d DOC improve OneHotEncoder documentation (#12314) 2018-10-15 08:08:25 +11:00
Joris Van den Bossche 1e7cd7df9d BUG Fix OrdinalEncoder with manually specified categories (#12367) 2018-10-13 21:45:19 +02:00