deephyper.skopt.space.space.CategoricalEncoder#
- class deephyper.skopt.space.space.CategoricalEncoder[source]#
Bases:
Transformer
OneHotEncoder that can handle categorical variables.
Methods
Fit a list or array of categories.
Inverse transform one-hot encoded categories back to their original representation.
Transform an array of categories to a one-hot encoded representation.
- fit(X)[source]#
Fit a list or array of categories.
- Parameters:
X (array-like, shape=(n_categories,)) – List of categories.