DEVELOPMENT...
Issue | #Downvotes for this reason | By |
---|
categories | Categories (unique values) per feature: - 'auto' : Determine categories automatically from the training data - list : ``categories[i]`` holds the categories expected in the ith column. The passed categories should not mix strings and numeric values within a single feature, and should be sorted in case of numeric values The used categories can be found in the ``categories_`` attribute .. versionadded:: 0.20 drop : {'first', 'if_binary'} or an array-like of shape (n_features,), default=None Specifies a methodology to use to drop one of the categories per feature. This is useful in situations where perfectly collinear features cause problems, such as when feeding the resulting data into an unregularized linear regression model However, dropping one category breaks the symmetry of the original representation and can therefore induce a bias in downstream models, for instance for penalized linear classification or regression models | default: "auto" |
drop | default: null | |
dtype | Desired dtype of output handle_unknown : {'error', 'ignore', 'infrequent_if_exist'}, default='error' Specifies the way unknown categories are handled during :meth:`transform` - 'error' : Raise an error if an unknown category is present during transform - 'ignore' : When 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 - 'infrequent_if_exist' : When an unknown category is encountered during transform, the resulting one-hot encoded columns for this feature will map to the infrequent category if it exists. The infrequent category will be mapped to the last position in the encoding. During inverse transform, an unknown category will be mapped to the category denoted `'infrequent'` if it exists. If the `'infrequent'` category does not exist, then :meth:`transform` and ... | default: {"oml-python:serialized_object": "type", "value": "np.float64"} |
handle_unknown | default: "infrequent_if_exist" | |
max_categories | Specifies an upper limit to the number of output features for each input
feature when considering infrequent categories. If there are infrequent
categories, `max_categories` includes the category representing the
infrequent categories along with the frequent categories. If `None`,
there is no limit to the number of output features
.. versionadded:: 1.1
Read more in the :ref:`User Guide | default: null |
min_frequency | Specifies the minimum frequency below which a category will be
considered infrequent
- If `int`, categories with a smaller cardinality will be considered
infrequent
- If `float`, categories with a smaller cardinality than
`min_frequency * n_samples` will be considered infrequent
.. versionadded:: 1.1
Read more in the :ref:`User Guide | default: null |
sparse | Will return sparse matrix if set True else will return an array | default: false |