Documentation of 'smile.feature.MaxAbsScaler' Java class
MaxAbsScaler
smile.feature

Class MaxAbsScaler



  • public class MaxAbsScaler
    extends FeatureTransform
    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.
    • Constructor Summary

      Constructors 
      Constructor and Description
      MaxAbsScaler()
      Constructor.
      MaxAbsScaler(boolean copy)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void learn(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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MaxAbsScaler

        public MaxAbsScaler()
        Constructor.
      • MaxAbsScaler

        public MaxAbsScaler(boolean copy)
        Constructor.
        Parameters:
        copy - If false, try to avoid a copy and do inplace scaling instead.
    • Method Detail

      • learn

        public void learn(Attribute[] attributes,
                          double[][] data)
        Description copied from class: FeatureTransform
        Learns transformation parameters from a dataset.
        Specified by:
        learn in class FeatureTransform
        Parameters:
        attributes - The variable attributes. Of which, numeric variables will be standardized.
        data - The training data to learn scaling parameters. The data will not be modified.
      • transform

        public double[] transform(double[] x)
        Scales each feature by its maximum absolute value.
        Specified by:
        transform in class FeatureTransform
        Parameters:
        x - a vector to be scaled. The vector will be modified on output.
        Returns:
        the input vector.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.