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, and should be sorted in case of numeric values The used categories can be found in the ``categories_`` attribute | default: [[0, 1], [0, 1]] |
dtype | Desired dtype of output handle_unknown : {'error', 'use_encoded_value'}, default='error' When set to 'error' an error will be raised in case an unknown categorical feature is present during transform. When set to 'use_encoded_value', the encoded value of unknown categories will be set to the value given for the parameter `unknown_value`. In :meth:`inverse_transform`, an unknown category will be denoted as None .. versionadded:: 0.24 | default: {"oml-python:serialized_object": "type", "value": "np.float64"} |
encoded_missing_value | Encoded value of missing categories. If set to `np.nan`, then the `dtype` parameter must be a float dtype .. versionadded:: 1.1 | default: NaN |
handle_unknown | default: "error" | |
max_categories | Specifies an upper limit to the number of output categories 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
`max_categories` do **not** take into account missing or unknown
categories. Setting `unknown_value` or `encoded_missing_value` to an
integer will increase the number of unique integer codes by one each
This can result in up to `max_categories + 2` integer codes
.. versionadded:: 1.3
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.3
Read more in the :ref:`User Guide | default: null |
unknown_value | When the parameter handle_unknown is set to 'use_encoded_value', this parameter is required and will set the encoded value of unknown categories. It has to be distinct from the values used to encode any of the categories in `fit`. If set to np.nan, the `dtype` parameter must be a float dtype .. versionadded:: 0.24 | default: null |