skopt.space.transformers.LabelEncoder¶
-
class
skopt.space.transformers.LabelEncoder(X=None)[source][source]¶ LabelEncoder that can handle categorical variables.
Methods
fit(X)Fit a list or array of categories.
Inverse transform integer categories back to their original
transform(X)Transform an array of categories to a one-hot encoded representation.
-
fit(X)[source][source]¶ Fit a list or array of categories.
- Parameters
- Xarray-like, shape=(n_categories,)
List of categories.
-