lale.lib.sklearn.one_hot_encoder module

class lale.lib.sklearn.one_hot_encoder.OneHotEncoderImpl(**hyperparams)[source]

Bases: object

fit(X, y=None)[source]
get_feature_names(input_features=None)[source]

Return feature names for output features after this transformation. This uses the output features obtained from scikit-learn’s OneHotEncoder’s get_feature_names method. https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder.get_feature_names The precedence of input feature names used is as follows: 1. input_features passed as an argument to this function.

This is a list string of length n_features.

  1. feature_names obtained at the time of training. They are input data’s column names if it was a Pandas dataframe.

  2. feature_names obtained at the time of training. If training data was not a Pandas DataFrame, this method returns the output of scikit’s get_feature_names(None).

Returns

output_feature_names

Return type

array of string, length n_output_features

transform(X)[source]