public class NormalizerMinMaxScaler extends Object implements DataNormalization
Constructor and Description |
---|
NormalizerMinMaxScaler() |
NormalizerMinMaxScaler(double minRange,
double maxRange)
Preprocessor can take a range as minRange and maxRange
|
Modifier and Type | Method and Description |
---|---|
void |
fit(DataSet dataSet)
Fit a dataset (only compute
based on the statistics from this dataset0
|
void |
fit(DataSetIterator iterator)
Fit the given model
|
void |
fitLabel(boolean fitLabels)
Flag to specify if the labels/outputs in the dataset should be also normalized
default value is false
|
INDArray |
getLabelMax() |
INDArray |
getLabelMin() |
INDArray |
getMax() |
INDArray |
getMin() |
boolean |
isFitLabel()
Whether normalization for the labels is also enabled.
|
void |
load(File... statistics)
Load the given min and max
|
void |
preProcess(DataSet toPreProcess)
Pre process a dataset
|
void |
revert(DataSet toPreProcess)
Revert the data to what it was before transform
|
void |
revertFeatures(INDArray features)
Undo (revert) the normalization applied by this DataNormalization instance to the specified features array
|
void |
revertLabels(INDArray labels)
Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.
|
void |
revertPreProcess(DataSet toPreProcess) |
void |
save(File... files)
Save the current min and max
|
void |
setMaxRange(double maxRange) |
void |
setMinRange(double minRange) |
void |
transform(DataSet toPreProcess)
Transform the data
|
void |
transform(INDArray theFeatures)
Transform the dataset
|
void |
transformLabel(INDArray labels)
Transform the labels.
|
public NormalizerMinMaxScaler(double minRange, double maxRange)
minRange
- maxRange
- public NormalizerMinMaxScaler()
public void setMinRange(double minRange)
public void setMaxRange(double maxRange)
public void fit(DataSet dataSet)
DataNormalization
fit
in interface DataNormalization
dataSet
- the dataset to compute onpublic void fit(DataSetIterator iterator)
fit
in interface DataNormalization
iterator
- for the data to iterate overpublic void fitLabel(boolean fitLabels)
fitLabel
in interface DataNormalization
public boolean isFitLabel()
DataNormalization
isFitLabel
in interface DataNormalization
public void preProcess(DataSet toPreProcess)
DataSetPreProcessor
preProcess
in interface DataSetPreProcessor
preProcess
in interface DataNormalization
toPreProcess
- the data set to pre processpublic void transform(DataSet toPreProcess)
transform
in interface DataNormalization
toPreProcess
- the dataset to transformpublic void transform(INDArray theFeatures)
DataNormalization
transform
in interface DataNormalization
theFeatures
- the features to pre processpublic void transformLabel(INDArray labels)
DataNormalization
DataNormalization.isFitLabel()
== false, this is a no-optransformLabel
in interface DataNormalization
public void revertPreProcess(DataSet toPreProcess)
public void revert(DataSet toPreProcess)
revert
in interface DataNormalization
toPreProcess
- the dataset to revert backpublic void revertFeatures(INDArray features)
DataNormalization
revertFeatures
in interface DataNormalization
features
- Features to revert the normalization onpublic void revertLabels(INDArray labels)
DataNormalization
#isFitLabels()
== false) then this is a no-op.
Can also be used to undo normalization for network output arrays, in the case of regression.revertLabels
in interface DataNormalization
labels
- Labels array to revert the normalization onpublic INDArray getMin()
public INDArray getMax()
public INDArray getLabelMin()
public INDArray getLabelMax()
public void load(File... statistics) throws IOException
load
in interface DataNormalization
statistics
- the statistics to loadIOException
public void save(File... files) throws IOException
save
in interface DataNormalization
files
- the statistics to saveIOException
Copyright © 2016. All Rights Reserved.