Skip to content

Commit

Permalink
DOC improve OneHotEncoder documentation (#12314)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheukting authored and jnothman committed Oct 15, 2018
1 parent 7c5cddd commit 95150dd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sklearn/preprocessing/_encoders.py
Expand Up @@ -145,7 +145,7 @@ class OneHotEncoder(_BaseEncoder):
Parameters
----------
categories : 'auto' or a list of lists/arrays of values.
categories : 'auto' or a list of lists/arrays of values, default='auto'.
Categories (unique values) per feature:
- 'auto' : Determine categories automatically from the training data.
Expand All @@ -162,15 +162,15 @@ class OneHotEncoder(_BaseEncoder):
dtype : number type, default=np.float
Desired dtype of output.
handle_unknown : 'error' (default) or 'ignore'
handle_unknown : 'error' or 'ignore', default='error'.
Whether to raise an error or ignore if an unknown categorical feature
is present during transform (default is to raise). When this parameter
is set to 'ignore' and an unknown category is encountered during
transform, the resulting one-hot encoded columns for this feature
will be all zeros. In the inverse transform, an unknown category
will be denoted as None.
n_values : 'auto', int or array of ints
n_values : 'auto', int or array of ints, default='auto'
Number of values per feature.
- 'auto' : determine value range from training data.
Expand All @@ -184,10 +184,10 @@ class OneHotEncoder(_BaseEncoder):
The `n_values` keyword was deprecated in version 0.20 and will
be removed in 0.22. Use `categories` instead.
categorical_features : "all" or array of indices or mask
categorical_features : 'all' or array of indices or mask, default='all'
Specify what features are treated as categorical.
- 'all' (default): All features are treated as categorical.
- 'all': All features are treated as categorical.
- array of indices: Array of categorical feature indices.
- mask: Array of length n_features and with dtype=bool.
Expand Down

0 comments on commit 95150dd

Please sign in to comment.