MaxAbsScaler#
- class pyts.preprocessing.MaxAbsScaler[source]#
Scale each sample by its maximum absolute value.
Examples
>>> from pyts.preprocessing import MaxAbsScaler >>> X = [[1, 5, 3, 2, 10, 6, 4, 7], ... [1, -5, 3, 2, 2, 1, 0, 2]] >>> scaler = MaxAbsScaler() >>> scaler.transform(X) array([[ 0.1, 0.5, 0.3, 0.2, 1. , 0.6, 0.4, 0.7], [ 0.2, -1. , 0.6, 0.4, 0.4, 0.2, 0. , 0.4]])
Methods
__init__()fit([X, y])Pass.
fit_transform(X[, y])Fit to data, then transform it.
get_metadata_routing()Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
set_output(*[, transform])Set output container.
set_params(**params)Set the parameters of this estimator.
transform(X)Scale the data.