evalml.pipelines.components.OneHotEncoder

Inheritance diagram of OneHotEncoder
class evalml.pipelines.components.OneHotEncoder(top_n=10, categories=None, drop=None, handle_unknown='ignore', handle_missing='error', random_state=0, **kwargs)[source]

One-hot encoder to encode non-numeric data.

name = 'One Hot Encoder'
model_family = 'none'
hyperparameter_ranges = {}
default_parameters = {'categories': None, 'drop': None, 'handle_missing': 'error', 'handle_unknown': 'ignore', 'top_n': 10}

Instance attributes

parameters

Returns the parameters which were used to initialize the component

Methods:

__init__

Initalizes an transformer that encodes categorical features in a one-hot numeric array.”

clone

Constructs a new component with the same parameters

describe

Describe a component and its parameters

fit

Fits component to data

fit_transform

Fits on X and transforms X

get_feature_names

Returns names of transformed and added columns

load

Loads component at file path

save

Saves component at file path

transform

One-hot encode the input DataFrame.