public abstract class AbstractMultiDataSetNormalizer<S extends NormalizerStats> extends AbstractNormalizer implements MultiDataNormalization
MultiDataSet
instances or iteratorsModifier 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(MultiDataSet dataSet)
Fit a MultiDataSet (only compute based on the statistics from this
MultiDataSet ) |
void |
fit(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(MultiDataSet toPreProcess)
Pre process a MultiDataSet
|
void |
revert(MultiDataSet data)
Revert the data to what it was before transform
|
void |
revertFeatures(INDArray[] features)
Undo (revert) the normalization applied by this normalizer to the features arrays
|
void |
revertFeatures(INDArray[] features,
INDArray[] maskArrays)
Undo (revert) the normalization applied by this normalizer to the features arrays
|
void |
revertFeatures(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(INDArray[] labels,
INDArray[] labelsMask)
Undo (revert) the normalization applied by this normalizer to the labels arrays.
|
void |
revertLabels(INDArray labels,
INDArray mask,
int output)
Undo (revert) the normalization applied by this normalizer to a specific labels array.
|
void |
transform(MultiDataSet toPreProcess)
Transform the dataset
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType
protected 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 AbstractNormalizer
protected S getFeatureStats(int input)
protected S getLabelStats(int output)
public void fit(@NonNull MultiDataSet dataSet)
MultiDataSet
)fit
in interface Normalizer<MultiDataSet>
dataSet
- the dataset to compute onpublic void fit(@NonNull MultiDataSetIterator iterator)
fit
in interface MultiDataNormalization
iterator
- for the data to iterate overprotected abstract NormalizerStats.Builder newBuilder()
public void transform(@NonNull MultiDataSet toPreProcess)
Normalizer
transform
in interface Normalizer<MultiDataSet>
toPreProcess
- the dataset to re processpublic void preProcess(@NonNull MultiDataSet toPreProcess)
preProcess
in interface MultiDataSetPreProcessor
preProcess
in interface MultiDataNormalization
toPreProcess
- the data set to pre processpublic void revert(@NonNull MultiDataSet data)
revert
in interface Normalizer<MultiDataSet>
data
- the dataset to revert backpublic void revertFeatures(@NonNull INDArray[] features)
revertFeatures
in interface MultiDataNormalization
features
- Features to revert the normalization onpublic void revertFeatures(@NonNull INDArray[] features, INDArray[] maskArrays)
revertFeatures
in interface MultiDataNormalization
features
- Features to revert the normalization onpublic void revertFeatures(@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 MultiDataNormalization
labels
- Labels array to revert the normalization onpublic void revertLabels(@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 MultiDataNormalization
labels
- Labels arrays to revert the normalization onlabelsMask
- Labels mask array (may be null)public void revertLabels(@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 © 2017. All rights reserved.