OneHotEncoder

OneHotEncoder(columns=None, numerical=[])

This transformer applies One-Hot-Encoder to features.

Attributes

numerical: pandas [n_columns]. numerical columns to be treated as categorical. columns: pandas [n_columns]. columns to use (if None then all categorical variables are included).

Examples

For usage examples, please see: https://jaisenbe58r.github.io/MLearner/user_guide/preprocessing/OneHotEncoder/

Methods


fit(X, y=None, fit_params)

Selecting OneHotEncoder columns from the dataset.

Parameters

Returns

self


fit_transform(X, y=None, fit_params)

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters

Returns


get_params(deep=True)

Get parameters for this estimator.

Parameters

Returns


set_params(params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter> so that it's possible to update each component of a nested object.

Returns

self


transform(X)

Trransformer applies log to skewed features.

Parameters

Returns