_LabelEncoder

class _LabelEncoder[source]

Bases: sklearn.preprocessing._label.LabelEncoder

Inherited-members

Methods

fit(y)

Fit label encoder.

fit_transform(y)

Fit label encoder and return encoded labels.

get_params([deep])

Get parameters for this estimator.

inverse_transform(y)

Transform labels back to original encoding.

set_params(**params)

Set the parameters of this estimator.

transform(y, strategy)

Transform labels to normalized encoding.

transform(y: pandas.core.series.Series, strategy: str)[source]

Transform labels to normalized encoding.

Parameters
  • y (array-like of shape (n_samples,)) – Target values.

  • strategy (str) –

Returns

y – Labels as normalized encodings.

Return type

array-like of shape (n_samples,)