Flow
TEST5046746c5asklearn.preprocessing._encoders.OrdinalEncoder

TEST5046746c5asklearn.preprocessing._encoders.OrdinalEncoder

Visibility: public Uploaded 05-11-2024 by Continuous Integration sklearn==1.1.3 numpy>=1.17.3 scipy>=1.3.2 joblib>=1.0.0 threadpoolctl>=2.0.0 0 runs
0 likes downloaded by 0 people 0 issues 0 downvotes , 0 total downloads
  • openml-python python scikit-learn sklearn sklearn_1.1.3
Issue #Downvotes for this reason By


Loading wiki
Help us complete this description Edit
Encode categorical features as an integer array. The input to this transformer should be an array-like of integers or strings, denoting the values taken on by categorical (discrete) features. The features are converted to ordinal integers. This results in a single column of integers (0 to n_categories - 1) per feature.

Parameters

categoriesCategories (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_`` attributedefault: [[0, 1], [0, 1]]
dtypeDesired 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.24default: {"oml-python:serialized_object": "type", "value": "np.float64"}
encoded_missing_valueEncoded value of missing categories. If set to `np.nan`, then the `dtype` parameter must be a float dtype .. versionadded:: 1.1default: NaN
handle_unknowndefault: "error"
unknown_valueWhen 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.24default: null

0
Runs

List all runs
Parameter:
Rendering chart
Rendering table