Class AbstractDataSetNormalizer<S extends NormalizerStats>

    • Constructor Detail

      • AbstractDataSetNormalizer

        protected AbstractDataSetNormalizer​(NormalizerStrategy<S> strategy)
    • Method Detail

      • fitLabel

        public void fitLabel​(boolean fitLabels)
        Flag to specify if the labels/outputs in the dataset should be also normalized default value is false
        Specified by:
        fitLabel in interface DataNormalization
        Parameters:
        fitLabels -
      • isFitLabel

        public boolean isFitLabel()
        Whether normalization for the labels is also enabled. Most commonly used for regression, not classification.
        Specified by:
        isFitLabel in interface DataNormalization
        Returns:
        True if labels will be
      • fit

        public void fit​(DataSet dataSet)
        Fit a dataset (only compute based on the statistics from this dataset)
        Specified by:
        fit in interface Normalizer<S extends NormalizerStats>
        Parameters:
        dataSet - the dataset to compute on
      • getFeatureStats

        protected S getFeatureStats()
      • getLabelStats

        protected S getLabelStats()
      • fit

        public void fit​(DataSetIterator iterator)
        Fit the given model
        Specified by:
        fit in interface DataNormalization
        Parameters:
        iterator - for the data to iterate over
      • transform

        public void transform​(INDArray features,
                              INDArray featuresMask)
        Description copied from interface: DataNormalization
        Transform the features, with an optional mask array
        Specified by:
        transform in interface DataNormalization
        Parameters:
        features - the features to pre process
        featuresMask - the mask array to pre process
      • revertFeatures

        public void revertFeatures​(INDArray features)
        Description copied from interface: DataNormalization
        Undo (revert) the normalization applied by this DataNormalization instance to the specified features array
        Specified by:
        revertFeatures in interface DataNormalization
        Parameters:
        features - Features to revert the normalization on
      • revertFeatures

        public void revertFeatures​(INDArray features,
                                   INDArray featuresMask)
        Description copied from interface: DataNormalization
        Undo (revert) the normalization applied by this DataNormalization instance to the specified features array
        Specified by:
        revertFeatures in interface DataNormalization
        Parameters:
        features - Features to revert the normalization on
      • revertLabels

        public 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., isFitLabel() == false) then this is a no-op. Can also be used to undo normalization for network output arrays, in the case of regression.
        Specified by:
        revertLabels in interface DataNormalization
        Parameters:
        labels - Labels array to revert the normalization on
      • revertLabels

        public void revertLabels​(INDArray labels,
                                 INDArray labelsMask)
        Description copied from interface: DataNormalization
        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.
        Specified by:
        revertLabels in interface DataNormalization
        Parameters:
        labels - Labels array to revert the normalization on
        labelsMask - Labels mask array (may be null)
      • revert

        public void revert​(DataSet data)
        Revert the data to what it was before transform
        Specified by:
        revert in interface Normalizer<S extends NormalizerStats>
        Parameters:
        data - the dataset to revert back