trajminer.preprocessing.OneHotEncoder

class trajminer.preprocessing.OneHotEncoder

Encode trajectory features as the concatenation of the one-hot numeric array for each feature.

__init__()

Initialize self. See help(type(self)) for accurate signature.

fit(X)

Fit OneHotEncoder to X.

Xarray-like, shape (n_samples, max_length, n_features)

Input data for setting up the encoder.

fit_transform(X)

Fit OneHotEncoder to X, then transform X.

Xarray-like, shape (n_samples, max_length, n_features)

Input data to encode.

X_outarray-like

Transformed input.

inverse_transform(X)

Convert X back to its original representation.

Xarray-like, shape (n_samples, max_length, ?)

Input data to decode.

X_outarray-like, shape (n_samples, max_length, n_features)

Original data.

transform(X)

Transform X.

Xarray-like, shape (n_samples, max_length, n_features)

Input data to encode.

X_outarray-like

Transformed input.