Commit Graph

219 Commits

Author SHA1 Message Date
Raf Baluyot 1f5bcaeb39 FIX float16 overflow on accumulator operations in StandardScaler (#13010) 2019-01-26 18:15:18 +01: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
Roman Yurchak 684d8a221d MAINT Use set litterals when possible (#12667) 2019-01-06 19:21:45 +08:00
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02:00
Adrin Jalali 2bd87f6ed8 Remove python < 3.5 from CI (#12746) 2018-12-14 10:53:12 +01:00
Bartosz Michałowski fa98a72dcc MNT Replaced all occurrences of assert_true and assert_false with assert (#12588) 2018-11-28 09:16:26 +08: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
Hanmin Qin 43e3a02085
MNT Remove unused assert_true imports (#12560) 2018-11-11 11:08:37 +08:00
Yaroslav Halchenko 362cb3bcab TST autoreplace assert_true(...==...) with plain assert (#12547) 2018-11-11 09:05:34 +08:00
Nicolas Hug 042843a2dd FIX YeoJohnson transform lambda bounds (#12522) 2018-11-08 18:57:40 +11:00
jeremiedbb ebe77d6936 modify kbins test using kmeans due to unstable local minimum (#12450) 2018-10-24 13:04:38 +02:00
Andrew Nystrom a5fa7d3e6f [MRG] Fast PolynomialFeatures on CSR matrices (#12197) 2018-10-19 10:55:14 +02:00
bauks a1d0e96791 FIX Increase mean precision for large float32 arrays (#12338) 2018-10-16 09:08:39 +02:00
Joris Van den Bossche 1e7cd7df9d BUG Fix OrdinalEncoder with manually specified categories (#12367) 2018-10-13 21:45:19 +02:00
Andreas Mueller 0f94f2962b
MNT simple deprecations and removals for 0.21 (#12238)
Part of #11992.
These were all the things that seemed pretty straight-forward. It's actually a bit bulky but should still be easy to review, hopefully.
2018-10-11 14:56:37 -04:00
Eric Chang bbb0d935f5 [MRG] FIX Update power_transform docstring and add FutureWarning (#12317) 2018-10-10 07:53:26 +02:00
Ekaterina Krivich 4e2e1fac0d ENH Cache class mapping in MultiLabelBinarizer() (#12116)
Fixes #11680
2018-10-09 00:24:24 +11:00
Tom Dupré la Tour 3e5777a0bd [MRG] Fast PolynomialFeatures on dense arrays (#12251) 2018-10-03 19:06:07 +02:00
Sam Waterbury 11612fc867 MNT Raise error for duplicate classes when constructing a MultiLabelBinarizer (#12195) 2018-10-02 08:06:58 +08:00
Joris Van den Bossche dfdf605f67 BUG always raise on NaN in OneHotEncoder for object dtype data (#12033) 2018-09-13 14:50:08 +02:00
Andreas Mueller 3a0b009804 don't use nextafter to define eps (#11611) 2018-07-24 11:09:46 +02:00
ZJ Poh adddf00433 [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
Giovanni Giuseppe Costa 61547de6b7 ENH KBinsDiscretizer : inverse_transform for ohe encoder (#11505) 2018-07-21 11:57:51 +08:00
Nicolas Hug 2d232acdeb [MRG] Add Yeo-Johnson transform to PowerTransformer (#11520) 2018-07-20 22:32:12 +02:00
Andreas Mueller b9330d96c9 pep8 whoops 2018-07-17 17:00:41 -05:00
Andreas Mueller 8e2c2aa35d
raise DeprecationWarnings and FutureWarnings as errors (#11570)
Towards #11252.
In the end we'd like to make these errors so we can keep this cleaner in the future.
2018-07-17 15:31:45 -05:00
Nirvan Anjirbag 61fa3155da [MRG] Add get_feature_names to OneHotEncoder (#10198)
**Reference Issues/PRs**
Fixes #10181 

**What does this implement/fix? Explain your changes.**
Added function **get_feature_names()** to **CategoricalEncoder** class. This is in `data.py` under `sklearn.preprocessing` 


<!--
Please be aware that we are a loose team of volunteers so patience is
necessary; assistance handling other issues is very welcome. We value
all user contributions, no matter how minor they are. If we are slow to
review, either the pull request needs some benchmarking, tinkering,
convincing, etc. or more likely the reviewers are simply busy. In either
case, we ask for your understanding during the review process.
For more information, see our FAQ on this topic:
http://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.

Thanks for contributing!
-->
2018-07-16 15:02:49 -05:00
Joel Nothman 7636606f47 Merge branch 'discrete' (#9342) 2018-07-12 10:27:35 +10:00
Hanmin Qin e4089d1ea2 [MRG] ENH Remove ignored_features in KBinsDiscretizer (#11467) 2018-07-11 22:55:28 +02:00
Guillaume Lemaitre a2b56453e2 ENH Passthrough DataFrame in FunctionTransformer (#11043) 2018-07-10 17:48:03 +08:00
Hanmin Qin d1e26155e1 Merge branch 'master' into discrete 2018-07-10 10:02:46 +08:00
Joel Nothman bb719e188c Move _transform_selected helper to base.py 2018-07-10 09:52:25 +10: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
Guillaume Lemaitre f8adfa27ae [MRG] Ignore and pass-through NaNs in RobustScaler and robust_scale (#11308) 2018-07-05 16:34:31 +02:00
Joris Van den Bossche 0b0bd9b369 [MRG] Use hashtable (python sets/dicts) for object dtype data in Encoders (#10209) 2018-07-03 09:51:07 +02:00
Joel Nothman 5a9ce9fe3f CI fix scipy-dev build for good (#11377)
Also add commit flag [scipy-dev] to run scipy-dev build in Travis, which is very useful in a PR
to make sure that the scipy-dev passes.
2018-06-28 16:49:51 +02:00
Joris Van den Bossche e93cde5739 FIX OneHot/OrdinalEncoder: correctly coerced dtype of passed categories (#11347) 2018-06-28 09:36:44 +10:00
Lucija Gregov f43dd0e650 ENH Ignore and pass-through NaN values in MaxAbsScaler and maxabs_scale (#11011) 2018-06-23 19:15:01 +10:00
Guillaume Lemaitre c1bc665958 ENH ignore NaNs in PowerTransformer (#11306) 2018-06-22 08:22:24 +10:00
Guillaume Lemaitre 5718466bb5 [MRG] ENH: Ignore NaNs in StandardScaler and scale (#11206) 2018-06-21 15:48:38 +02: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
Tom Dupré la Tour e86191448b FIX lazy merge 2018-06-14 20:37:05 +02:00
Tom Dupré la Tour e2b6240310 Merge branch 'master' into 9342
Conflicts:
	sklearn/preprocessing/data.py
	sklearn/preprocessing/tests/test_data.py
2018-06-14 18:06:29 +02:00
Guillaume Lemaitre a4f8e3d2a2 FIX: enforce consistency between dense and sparse cases in StandardScaler (#11235) 2018-06-14 19:18:39 +10:00
Guillaume Lemaitre 4272bbad0c [MRG] EHN ignore nan in minmax_scale (#11243) 2018-06-12 15:09:16 +02:00
Roman Yurchak e8d8b8eeb0 TST: parametrize unit tests (#11074)
yield tests are deprecated in pytest and will be removed in pytest 4.0.
They all have been replaced by parametrize.
2018-06-08 14:59:33 +02:00
Daniel a6028fc059 BUG: Ensure OneHotEncoder outputs sparse matrix with given dtype (#11042) 2018-06-06 10:59:27 +02:00
Joel Nothman f737fe6af3
Merge branch 'master' into discrete 2018-05-30 12:56:45 +10:00