smile.feature
Class WinsorScaler
- java.lang.Object
-
- smile.feature.FeatureTransform
-
- smile.feature.Scaler
-
- smile.feature.WinsorScaler
-
public class WinsorScaler extends Scaler
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 WinsorScaler(double lower, double upper)Constructor.WinsorScaler(double lower, double upper, boolean copy)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidlearn(Attribute[] attributes, double[][] data)Learns transformation parameters from a dataset.java.lang.StringtoString()-
Methods inherited from class smile.feature.FeatureTransform
learn, transform
-
-
-
-
Constructor Detail
-
WinsorScaler
public WinsorScaler(double lower, double upper)Constructor. Inplace transformation.- Parameters:
lower- the lower limit in terms of percentiles of the original distribution (say 5th percentile).upper- the upper limit in terms of percentiles of the original distribution (say 95th percentile).
-
WinsorScaler
public WinsorScaler(double lower, double upper, boolean copy)Constructor.- Parameters:
lower- the lower limit in terms of percentiles of the original distribution (say 5th percentile).upper- the upper limit in terms of percentiles of the original distribution (say 95th percentile).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:FeatureTransformLearns transformation parameters from a dataset.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG