Interface MaxAbsScaler
public interface MaxAbsScaler
Scales each feature by its maximum absolute value. This class scales and
translates each feature individually such that the maximal absolute value
of each feature in the training set will be 1.0. It does not shift/center
the data, and thus does not destroy any sparsity.
The maximum absolute value accumulator is initialized at 0.0, so even
all-negative columns produce the correct result (e.g., [-3,-2,-1]
yields scale = 3.0). When all values are zero the scale falls back to 1.0.
-
Method Summary
Static Methods
-
Method Details
-
fit
Fits the data transformation.- Parameters:
data- the training data.columns- the columns to transform. If empty, transform all the numeric columns.- Returns:
- the transform.
- Throws:
IllegalArgumentException- if the data frame is empty or a specified column is non-numeric.
-