public class MaxAbsScaler extends FeatureTransform
copy| Constructor and Description |
|---|
MaxAbsScaler()
Constructor.
|
MaxAbsScaler(boolean copy)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
learn(smile.data.Attribute[] attributes,
double[][] data)
Learns transformation parameters from a dataset.
|
java.lang.String |
toString() |
double[] |
transform(double[] x)
Scales each feature by its maximum absolute value.
|
learn, transformpublic MaxAbsScaler()
public MaxAbsScaler(boolean copy)
copy - If false, try to avoid a copy and do inplace scaling instead.public void learn(smile.data.Attribute[] attributes,
double[][] data)
FeatureTransformlearn in class FeatureTransformattributes - The variable attributes. Of which, numeric variables
will be standardized.data - The training data to learn scaling parameters.
The data will not be modified.public double[] transform(double[] x)
transform in class FeatureTransformx - a vector to be scaled. The vector will be modified on output.public java.lang.String toString()
toString in class java.lang.Object