public abstract class AbstractMultiDataSetNormalizer<S extends NormalizerStats> extends AbstractNormalizer implements MultiDataNormalization
| Modifier and Type | Field and Description |
|---|---|
protected NormalizerStrategy<S> |
strategy |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMultiDataSetNormalizer() |
protected |
AbstractMultiDataSetNormalizer(NormalizerStrategy<S> strategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
fit(@NonNull MultiDataSet dataSet)
Fit a MultiDataSet (only compute based on the statistics from this
MultiDataSet) |
void |
fit(@NonNull MultiDataSetIterator iterator)
Fit an iterator
|
void |
fitLabel(boolean fitLabels)
Flag to specify if the labels/outputs in the dataset should be also normalized
default value is false
|
protected List<S> |
getFeatureStats() |
protected S |
getFeatureStats(int input) |
protected List<S> |
getLabelStats() |
protected S |
getLabelStats(int output) |
protected boolean |
isFit() |
boolean |
isFitLabel()
Whether normalization for the labels is also enabled.
|
protected abstract NormalizerStats.Builder |
newBuilder() |
int |
numInputs()
Get the number of inputs
|
int |
numOutputs()
Get the number of outputs
|
void |
preProcess(@NonNull MultiDataSet toPreProcess)
Pre process a MultiDataSet
|
void |
revert(@NonNull MultiDataSet data)
Revert the data to what it was before transform
|
void |
revertFeatures(@NonNull INDArray[] features)
Undo (revert) the normalization applied by this normalizer to the features arrays
|
void |
revertFeatures(@NonNull INDArray[] features,
INDArray[] maskArrays)
Undo (revert) the normalization applied by this normalizer to the features arrays
|
void |
revertFeatures(@NonNull INDArray features,
INDArray mask,
int input)
Undo (revert) the normalization applied by this normalizer to a specific features array.
|
void |
revertLabels(INDArray[] labels)
Undo (revert) the normalization applied by this DataNormalization instance to the specified labels array.
|
void |
revertLabels(@NonNull INDArray[] labels,
INDArray[] labelsMask)
Undo (revert) the normalization applied by this normalizer to the labels arrays.
|
void |
revertLabels(@NonNull INDArray labels,
INDArray mask,
int output)
Undo (revert) the normalization applied by this normalizer to a specific labels array.
|
void |
transform(@NonNull MultiDataSet toPreProcess)
Transform the dataset
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeprotected NormalizerStrategy<S extends NormalizerStats> strategy
protected AbstractMultiDataSetNormalizer()
protected AbstractMultiDataSetNormalizer(NormalizerStrategy<S> strategy)
public void fitLabel(boolean fitLabels)
fitLabels - public boolean isFitLabel()
protected boolean isFit()
isFit in class AbstractNormalizerprotected S getFeatureStats(int input)
protected S getLabelStats(int output)
public void fit(@NonNull
@NonNull MultiDataSet dataSet)
MultiDataSet)fit in interface Normalizer<MultiDataSet>dataSet - the dataset to compute onpublic void fit(@NonNull
@NonNull MultiDataSetIterator iterator)
fit in interface MultiDataNormalizationiterator - for the data to iterate overprotected abstract NormalizerStats.Builder newBuilder()
public void transform(@NonNull
@NonNull MultiDataSet toPreProcess)
Normalizertransform in interface Normalizer<MultiDataSet>toPreProcess - the dataset to re processpublic void preProcess(@NonNull
@NonNull MultiDataSet toPreProcess)
preProcess in interface MultiDataSetPreProcessorpreProcess in interface MultiDataNormalizationtoPreProcess - the data set to pre processpublic void revert(@NonNull
@NonNull MultiDataSet data)
revert in interface Normalizer<MultiDataSet>data - the dataset to revert backpublic void revertFeatures(@NonNull
@NonNull INDArray[] features)
revertFeatures in interface MultiDataNormalizationfeatures - Features to revert the normalization onpublic void revertFeatures(@NonNull
@NonNull INDArray[] features,
INDArray[] maskArrays)
revertFeatures in interface MultiDataNormalizationfeatures - Features to revert the normalization onpublic void revertFeatures(@NonNull
@NonNull INDArray features,
INDArray mask,
int input)
isFitLabel() == false) then this is a no-op.
Can also be used to undo normalization for network output arrays, in the case of regression.features - features arrays to revert the normalization oninput - the index of the array to revertpublic void revertLabels(INDArray[] labels)
isFitLabel() == 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 MultiDataNormalizationlabels - Labels array to revert the normalization onpublic void revertLabels(@NonNull
@NonNull INDArray[] labels,
INDArray[] labelsMask)
isFitLabel() == 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 MultiDataNormalizationlabels - Labels arrays to revert the normalization onlabelsMask - Labels mask array (may be null)public void revertLabels(@NonNull
@NonNull INDArray labels,
INDArray mask,
int output)
isFitLabel() == false) then this is a no-op.
Can also be used to undo normalization for network output arrays, in the case of regression.labels - Labels arrays to revert the normalization onoutput - the index of the array to revertpublic int numInputs()
public int numOutputs()
Copyright © 2021. All rights reserved.