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

Class Scaler

  • Direct Known Subclasses:
    WinsorScaler


    public class Scaler
    extends FeatureTransform
    Scales all numeric variables into the range [0, 1]. If the dataset has outliers, normalization will certainly scale the "normal" data to a very small interval. In this case, the Winsorization procedure should be applied: values greater than the specified upper limit are replaced with the upper limit, and those below the lower limit are replace with the lower limit. Often, the specified range is indicate in terms of percentiles of the original distribution (like the 5th and 95th percentile).
    • Constructor Summary

      Constructors 
      Constructor and Description
      Scaler()
      Constructor.
      Scaler(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)
      Transform a feature vector.
      • Methods inherited from class java.lang.Object

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

      • Scaler

        public Scaler()
        Constructor. Inplace transformation.
      • Scaler

        public Scaler(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)
        Description copied from class: FeatureTransform
        Transform a feature vector.
        Specified by:
        transform in class FeatureTransform
        Parameters:
        x - a feature vector.
        Returns:
        the transformed feature value.
      • 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.