Interface DataNormalization
-
- All Superinterfaces:
DataSetPreProcessor
,Normalizer<DataSet>
,Serializable
- All Known Implementing Classes:
AbstractDataSetNormalizer
,ImagePreProcessingScaler
,NormalizerMinMaxScaler
,NormalizerStandardize
,VGG16ImagePreProcessor
public interface DataNormalization extends Normalizer<DataSet>, DataSetPreProcessor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
fit(DataSetIterator iterator)
Iterates over a dataset accumulating statistics for normalizationvoid
fitLabel(boolean fitLabels)
Flag to specify if the labels/outputs in the dataset should be also normalized.boolean
isFitLabel()
Whether normalization for the labels is also enabled.void
preProcess(DataSet toPreProcess)
Pre process a datasetvoid
revertFeatures(INDArray features)
Undo (revert) the normalization applied by this DataNormalization instance to the specified features arrayvoid
revertFeatures(INDArray features, INDArray featuresMask)
Undo (revert) the normalization applied by this DataNormalization instance to the specified features arrayvoid
revertLabels(INDArray labels)
Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.void
revertLabels(INDArray labels, INDArray labelsMask)
Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.void
transform(INDArray features)
Transform the datasetvoid
transform(INDArray features, INDArray featuresMask)
Transform the features, with an optional mask arrayvoid
transformLabel(INDArray labels)
Transform the labels.void
transformLabel(INDArray labels, INDArray labelsMask)
Transform the labels.-
Methods inherited from interface org.nd4j.linalg.dataset.api.preprocessor.Normalizer
fit, getType, revert, transform
-
-
-
-
Method Detail
-
fit
void fit(DataSetIterator iterator)
Iterates over a dataset accumulating statistics for normalization- Parameters:
iterator
- the iterator to use for collecting statistics.
-
preProcess
void preProcess(DataSet toPreProcess)
Description copied from interface:DataSetPreProcessor
Pre process a dataset- Specified by:
preProcess
in interfaceDataSetPreProcessor
- Parameters:
toPreProcess
- the data set to pre process
-
transform
void transform(INDArray features)
Transform the dataset- Parameters:
features
- the features to pre process
-
transform
void transform(INDArray features, INDArray featuresMask)
Transform the features, with an optional mask array- Parameters:
features
- the features to pre processfeaturesMask
- the mask array to pre process
-
transformLabel
void transformLabel(INDArray labels)
Transform the labels. IfisFitLabel()
== false, this is a no-op
-
transformLabel
void transformLabel(INDArray labels, INDArray labelsMask)
Transform the labels. IfisFitLabel()
== false, this is a no-op
-
revertFeatures
void revertFeatures(INDArray features)
Undo (revert) the normalization applied by this DataNormalization instance to the specified features array- Parameters:
features
- Features to revert the normalization on
-
revertFeatures
void revertFeatures(INDArray features, INDArray featuresMask)
Undo (revert) the normalization applied by this DataNormalization instance to the specified features array- Parameters:
features
- Features to revert the normalization onfeaturesMask
-
-
revertLabels
void revertLabels(INDArray labels)
Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array. If labels normalization is disabled (i.e.,#isFitLabels()
== false) then this is a no-op. Can also be used to undo normalization for network output arrays, in the case of regression.- Parameters:
labels
- Labels array to revert the normalization on
-
revertLabels
void revertLabels(INDArray labels, INDArray labelsMask)
Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array. If labels normalization is disabled (i.e.,#isFitLabels()
== false) then this is a no-op. Can also be used to undo normalization for network output arrays, in the case of regression.- Parameters:
labels
- Labels array to revert the normalization onlabelsMask
- Labels mask array (may be null)
-
fitLabel
void fitLabel(boolean fitLabels)
Flag to specify if the labels/outputs in the dataset should be also normalized. Default value is usually false.
-
isFitLabel
boolean isFitLabel()
Whether normalization for the labels is also enabled. Most commonly used for regression, not classification.- Returns:
- True if labels will be
-
-