Source code for evalml.pipelines.components.transformers.encoders.onehot_encoder
import category_encoders as ce
from .encoder import CategoricalEncoder
[docs]class OneHotEncoder(CategoricalEncoder):
"""Creates one-hot encoding for non-numeric data"""
name = 'One Hot Encoder'
hyperparameter_ranges = {}
[docs] def __init__(self):
parameters = {}
encoder = ce.OneHotEncoder(use_cat_names=True, return_df=True)
super().__init__(parameters=parameters,
component_obj=encoder,
random_state=0)