evalml.pipelines.components.OneHotEncoder¶
-
class
evalml.pipelines.components.
OneHotEncoder
(top_n=10, features_to_encode=None, categories=None, drop=None, handle_unknown='ignore', handle_missing='error', random_state=None, random_seed=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, 'features_to_encode': None, 'handle_missing': 'error', 'handle_unknown': 'ignore', 'top_n': 10}¶
Instance attributes
needs_fitting
parameters
Returns the parameters which were used to initialize the component
Methods:
Initalizes an transformer that encodes categorical features in a one-hot numeric array.”
Returns a list of the unique categories to be encoded for the particular feature, in order.
Constructs a new component with the same parameters and random state.
Describe a component and its parameters
Fits component to data
Fits on X and transforms X
Return feature names for the categorical features after fitting.
Loads component at file path
Saves component at file path
One-hot encode the input data.
-