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 voidfit(DataSetIterator iterator)Iterates over a dataset accumulating statistics for normalizationvoidfitLabel(boolean fitLabels)Flag to specify if the labels/outputs in the dataset should be also normalized.booleanisFitLabel()Whether normalization for the labels is also enabled.voidpreProcess(DataSet toPreProcess)Pre process a datasetvoidrevertFeatures(INDArray features)Undo (revert) the normalization applied by this DataNormalization instance to the specified features arrayvoidrevertFeatures(INDArray features, INDArray featuresMask)Undo (revert) the normalization applied by this DataNormalization instance to the specified features arrayvoidrevertLabels(INDArray labels)Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.voidrevertLabels(INDArray labels, INDArray labelsMask)Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.voidtransform(INDArray features)Transform the datasetvoidtransform(INDArray features, INDArray featuresMask)Transform the features, with an optional mask arrayvoidtransformLabel(INDArray labels)Transform the labels.voidtransformLabel(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:DataSetPreProcessorPre process a dataset- Specified by:
preProcessin 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
-
-