Commit Graph

159 Commits

Author SHA1 Message Date
Adrin Jalali 76d763be80 DOC added to preprocessing docstring examples (#11752) 2018-08-07 15:24:05 +03:00
ZJ Poh adddf00433 [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
Nicolas Hug 2d232acdeb [MRG] Add Yeo-Johnson transform to PowerTransformer (#11520) 2018-07-20 22:32:12 +02:00
Ronan Lamy 5592a2eda9 [MRG] PyPy support for all but a couple of estimators (#11010) 2018-07-20 14:39:53 +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
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
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
Daniel a6028fc059 BUG: Ensure OneHotEncoder outputs sparse matrix with given dtype (#11042) 2018-06-06 10:59:27 +02:00
Nicholas Nadeau, P.Eng., AVS 3e26fc63be MAINT Fixing Typos (#11017) 2018-04-24 09:32:25 +10:00
Lucija Gregov f1aedf661a [MRG+1] NaN handling MinMaxScaler (#11005) 2018-04-21 22:49:36 +02:00
Guillaume Lemaitre c3548a8e29 [MRG] EHN handle NaN value in QuantileTransformer (#10437) 2018-04-21 19:06:10 +02:00
SATISH J 2b1c5ef285 DOC Update an outdated docstring from sklearn.preprocessing.RobustScaler (#10940) 2018-04-09 21:30:18 +08: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
Alvaro Perez-Diaz 986cbda477 DOC: fix typo in StandardScaler docstring (#10779) 2018-03-08 15:59:41 +01:00
Loïc Estève a97e78b01a [MRG] MAINT: remove even more old scipy related code (#10721) 2018-03-01 07:52:10 +11:00
Jiongyan Zhang 727314b2fe [MRG+1] Fix FutureWarning in CategoricalEncoder due to np.issubdtype (#10507) (#10510) 2018-01-23 07:39:21 +01:00
Joel Nothman b94876a3a2 [MRG+1] ENH Polynomial features for sparse data (#10452) 2018-01-11 02:55:19 -08:00
Joel Nothman c3bdc0a89a
DOC clean up assorted type specifications (#10441) 2018-01-11 09:11:17 +11:00
Nihar Sheth cec3458b03 DOC Fix broken links in docs (#10353) 2017-12-22 18:23:29 +01:00
Eric Chang d8483dfee0 [MRG+1] ENH Add standardize flag to PowerTransformer (#10316) 2017-12-14 11:22:27 +01:00
Eric Chang 62e9bb8def Feature: Implement PowerTransformer (#10210) 2017-12-06 08:29:10 +11:00
Joris Van den Bossche a2ebb8cfd2 ENH: new CategoricalEncoder class (#9151) 2017-11-21 20:03:41 +11:00
Guillaume Lemaitre 89b02af431 [MRG+1] EHN Accept 1D array for preprocessing functions and update doc (#9596)
* EHN/TST robust_scale accepts 1D array

* DOC update doc for preprocessing functions
2017-08-22 19:08:47 +03:00
Naoya Kanai f6c7080ee5 DOC Clarify RobustScaler behavior with sparse input (#8858) 2017-07-29 22:23:46 +10:00
Dmitry Petrov 93c17f1380 [MRG+1] Added examples to docstrings of MinMaxScaler and StandardScaler (#9380)
[MRG+2] Added examples to docstrings of MinMaxScaler and StandardScaler
2017-07-18 15:13:10 -07:00
(Venkat) Raghav, Rajagopalan b6f8865b0a [MRG + 1 (rv) + 1 (alex) + 1] Add a check to test the docstring params and their order (#9206)
* add automatic test of docstrings for function / method signatures using numpydoc
2017-07-11 18:42:10 +02:00
(Venkat) Raghav, Rajagopalan 763d93b72e [MRG+1] Do not transform y (#9180)
* we do not transform y

* more

* added Deprecation Warning to transform() to remove Y parameter

* more

* ENH ensure FunctionTransformer's transform/inverse_transform doesn't permit y

* Undo changes to pls_. It will be done in a separate PR (see #9160)

* flake8

* Update whatsnew

* Fully undo PLS changes
2017-06-22 23:24:12 +02:00
Guillaume Lemaitre 6ff79f9416 [MRG+1] DOC add hyperlink to example (#9097)
* DOC add hyperlink to example

* Remove useless change

* DOC fix hyperlink

* DOC fix links
2017-06-10 16:13:50 +02:00
Guillaume Lemaitre 26a1027a83 [MRG+1] QuantileTransformer (#8363)
* resurrect quantile scaler

* move the code in the pre-processing module

* first draft

* Add tests.

* Fix bug in QuantileNormalizer.

* Add quantile_normalizer.

* Implement pickling

* create a specific function for dense transform

* Create a fit function for the dense case

* Create a toy examples

* First draft with sparse matrices

* remove useless functions and non-negative sparse compatibility

* fix slice call

* Fix tests of QuantileNormalizer.

* Fix estimator compatibility

* List of functions became tuple of functions
* Check X consistency at transform and inverse transform time

* fix doc

* Add negative ValueError tests for QuantileNormalizer.

* Fix cosmetics

* Fix compatibility numpy <= 1.8

* Add n_features tests and correct ValueError.

* PEP8

* fix fill_value for early scipy compatibility

* simplify sampling

* Fix tests.

* removing last pring

* Change choice for permutation

* cosmetics

* fix remove remaining choice

* DOC

* Fix inconsistencies

* pep8

* Add checker for init parameters.

* hack bounds and make a test

* FIX/TST bounds are provided by the fitting and not X at transform

* PEP8

* FIX/TST axis should be <= 1

* PEP8

* ENH Add parameter ignore_implicit_zeros

* ENH match output distribution

* ENH clip the data to avoid infinity due to output PDF

* FIX ENH restraint to uniform and norm

* [MRG] ENH Add example comparing the distribution of all scaling preprocessor (#2)

* ENH Add example comparing the distribution of all scaling preprocessor

* Remove Jupyter notebook convert

* FIX/ENH Select feat before not after; Plot interquantile data range for all

* Add heatmap legend

* Remove comment maybe?

* Move doc from robust_scaling to plot_all_scaling; Need to update doc

* Update the doc

* Better aesthetics; Better spacing and plot colormap only at end

* Shameless author re-ordering ;P

* Use env python for she-bang

* TST Validity of output_pdf

* EXA Use OrderedDict; Make it easier to add more transformations

* FIX PEP8 and replace scipy.stats by str in example

* FIX remove useless import

* COSMET change variable names

* FIX change output_pdf occurence to output_distribution

* FIX partial fixies from comments

* COMIT change class name and code structure

* COSMIT change direction to inverse

* FIX factorize transform in _transform_col

* PEP8

* FIX change the magic 10

* FIX add interp1d to fixes

* FIX/TST allow negative entries when ignore_implicit_zeros is True

* FIX use np.interp instead of sp.interpolate.interp1d

* FIX/TST fix tests

* DOC start checking doc

* TST add test to check the behaviour of interp numpy

* TST/EHN Add the possibility to add noise to compute quantile

* FIX factorize quantile computation

* FIX fixes issues

* PEP8

* FIX/DOC correct doc

* TST/DOC improve doc and add random state

* EXA add examples to illustrate the use of smoothing_noise

* FIX/DOC fix some grammar

* DOC fix example

* DOC/EXA make plot titles more succint

* EXA improve explanation

* EXA improve the docstring

* DOC add a bit more documentation

* FIX advance review

* TST add subsampling test

* DOC/TST better example for the docstring

* DOC add ellipsis to docstring

* FIX address olivier comments

* FIX remove random_state in sparse.rand

* FIX spelling doc

* FIX cite example in user guide and docstring

* FIX olivier comments

* EHN improve the example comparing all the pre-processing methods

* FIX/DOC remove title

* FIX change the scaling of the figure

* FIX plotting layout

* FIX ratio w/h

* Reorder and reword the plot_all_scaling example

* Fix aspect ratio and better explanations in the plot_all_scaling.py example

* Fix broken link and remove useless sentence

* FIX fix couples of spelling

* FIX comments joel

* FIX/DOC address documentation comments

* FIX address comments joel

* FIX inline sparse and dense transform

* PEP8

* TST/DOC temporary skipping test

* FIX raise an error if n_quantiles > subsample

* FIX wording in smoothing_noise example

* EXA Denis comments

* FIX rephrasing

* FIX make smoothing_noise to be a boolearn and change doc

* FIX address comments

* FIX verbose the doc slightly more

* PEP8/DOC

* ENH: 2-ways interpolation to avoid smoothing_noise

Simplifies also the code, examples, and documentation
2017-06-10 01:15:46 +02:00
Naoya Kanai 6579220588 [MRG+1] Drop NumPy < 1.8 (#8874) 2017-06-07 17:06:06 +02:00
Minghui Liu 398ffed8d1 Removed DataConversionWarning in Normalize (#8712) 2017-04-25 15:11:03 -04:00
David Robles f49f8905db Incorrect number of samples in One Hot Encoder example (#8255) 2017-02-01 11:33:06 +11:00
Andreas Mueller 5c4b1bb231 [MRG+1] Housekeeping Deprecations for v0.19 (#7927)
* remove stuff to be removed 0.19

* more changes

* remove classes from 0.19 whatsnew

* remove _LearntSelectorMixin

* remove ProjectedGradientNMF, load_lwf_*

* minor fixes

* remove more copy from logistic regression path

* remove lda, qda from __init__.__all__

* remove pg solver in nmf from tests etc

* remove class_weight="auto" from tests

* doctest change for decision_function_shape="ovr"

* remove transfrom from tree test, minor fixes to tree tests

* some fixes in the tests

* undo changes in functions which still allow 1d input...

* also allow 1d in scale

* more test fixes...

* last test fixes in forest and tree

* svm default value change doctest failures

* pep8

* remove more class_weight="auto" stuff

* minor cosmetics in docstrings deprecated / removed behavior.

* say that store_covariance has been moved to __init__ in discriminant_analysis
2016-12-09 12:43:38 -05:00
Joel Nothman 8570622a44 [MRG+1] DOC insert spaces before colons in parameter lists (#7920)
* DOC insert spaces before colons in parameter lists

Complies with numpydoc to improve rendering and automatic quality
assurance such as #7793. Affects listings of Parameters Attributes,
Returns.

Performed with the help of:

    grep -nE '^(    )+[a-zA-Z][a-zA-Z0-9_]*: ' sklearn -R | grep -v -e
    externals -e tests | grep -v -e default: -e else: -e Warning: -e Note:
    -e TRAIN: -e Default: -e True: -e False: -e DOI: -e In: | gsed
    's|\([^:]*\):\([0-9]*\):\([^:]*\):\(.*\)|--- a/\1\n+++ b/\1\n@@ -\2,1
    +\2,1 @@\n-\3:\4\n+\3 :\4|' | git apply --unidiff-zero -

* DOC fix numpydoc format for param
2016-11-25 10:59:22 +01:00
Loïc Estève e5bf61eee1 [MRG+1] Dropping python 2.6 support (#7890)
* Remove Python 2.6 support

Some details about some slightly orthogonal changes:
* Note about cheking safely for nan is likely not valid any more (commit
  introducing it is c80ca91b)
* scipy.linalg.qr econ parameter removed since scipy 0.9 in favour of
  mode='economic'
* Remove unnecessary libgfortran in conda create command

* Putative fix by setting the random seed

* Revert unintended change

* Reinstate previous logic for checking for NaNs

* Reinstate change in error message

Error messages from Python 2.7 assertRegexp does not contain the
function name, in contrast with Python 3 assertRegex
2016-11-23 17:11:04 -05:00
Ang Lu c17156106c [MRG+1] Fix return_norm bug in preprocessing.normalize (#7789)
Fixes #7771
2016-11-23 09:45:32 +11:00
Josh Karnofsky 9551ec85ea DOC add spaces before colons in docstrings (#7589) 2016-10-06 14:01:12 +11:00
Kathy Chen d5b66f9da9 [MRG+1] Docs: refer users to the other encoders to do one hot encoding for labels. (#7315)
* refer users to the other encoders to do one hot encoding for labels.

* added to the 'see more' for labelbinarizer, multilabelbinarizer, and labelencoder' as well as an example to multilabel binarizer

* added note about y labels to the OneHotEncoder docstring

* removed example from MultiLabelBinarizer

* documentation should specify LabelBinarizer, not MultiLabelBinarizer in OHE
2016-10-05 11:28:37 -04:00
Andreas Mueller 6972d6c15c DOC minor doc fixes for sphinx. (#7357) 2016-09-08 10:07:40 +10:00
Caio Oliveira 19d6d925ed [MRG+1] Fix for "_transform_selected" not copying when "selected='all'" (#7201)
* fixes issue scikit-learn/scikit-learn#7194

* Added test

* Making `selected='all'` explicit on test

* Updated whats_new.rst

* Fixed typo on `whats_new.rst`
2016-08-18 11:47:00 +02:00
Alexandre Gramfort 02806e9782 cosmit 2016-08-13 11:03:59 +02:00
Konstantin Podshumok f893565773 [MRG+2] ENH: (minor) add quantile_low/high parameters to robust scaler (#5929)
* add quantile_low/high parameters to robust scaler

add versionadded tags

* robust scaler: add parameter for quantile_range, check its validity

* robust scaler: simplify params validations

fix typo in docstrings of RobustScaler

* preprocessing.data fix some lines > 80 columns

* add whatsnew for robust scaler quantile_range param

add missing url link in whatsnew
2016-08-13 10:32:16 +02:00
Óscar Nájera 8034b2926e more examples references 2016-08-03 20:23:50 +02:00
John Moeller 055bc4c004 pep8 2016-06-22 02:10:41 -06:00
John Moeller 2242b1b2ea Make KernelCenterer a _pairwise operation
Replicate solution to 9a520779c2 except that `_pairwise` should always be `True` for `KernelCenterer` because it's supposed to receive a Gram matrix. This should make `KernelCenterer` usable in `Pipeline`s.

Happy to add tests, just tell me what should be covered.
2016-06-16 22:49:36 -06:00
Kevin Wang a2498218ac DOC cross-reference preprocessing estimators and functions in their docstrings 2016-05-10 11:00:41 +02:00