Flow
sklearn.preprocessing.data.OneHotEncoder

sklearn.preprocessing.data.OneHotEncoder

Visibility: public Uploaded 14-08-2021 by Sergey Redyuk sklearn==0.19.2 numpy>=1.8.2 scipy>=0.13.3 0 runs
0 likes downloaded by 0 people 0 issues 0 downvotes , 0 total downloads
  • openml-python python scikit-learn sklearn sklearn_0.19.2
Issue #Downvotes for this reason By


Loading wiki
Help us complete this description Edit
Encode categorical integer features using a one-hot aka one-of-K scheme. The input to this transformer should be a matrix of integers, denoting the values taken on by categorical (discrete) features. The output will be a sparse matrix where each column corresponds to one possible value of one feature. It is assumed that input features take on values in the range [0, n_values). This encoding is needed for feeding categorical data to many scikit-learn estimators, notably linear models and SVMs with the standard kernels. Note: a one-hot encoding of y labels should use a LabelBinarizer instead.

Parameters

categorical_featuresdefault: "all"
dtypeDesired dtype of outputdefault: {"oml-python:serialized_object": "type", "value": "np.float64"}
handle_unknownWhether to raise an error or ignore if a unknown categorical feature is present during transform.default: "ignore"
n_valuesNumber of values per feature - 'auto' : determine value range from training datadefault: "auto"
sparseWill return sparse matrix if set True else will return an arraydefault: false

0
Runs

List all runs
Parameter:
Rendering chart
Rendering table