Class AbstractMultiDataSetNormalizer<S extends NormalizerStats>

    • Constructor Detail

      • AbstractMultiDataSetNormalizer

        protected AbstractMultiDataSetNormalizer()
      • AbstractMultiDataSetNormalizer

        protected AbstractMultiDataSetNormalizer​(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
        Parameters:
        fitLabels -
      • isFitLabel

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

        protected S getFeatureStats​(int input)
      • getFeatureStats

        protected List<S> getFeatureStats()
      • getLabelStats

        protected S getLabelStats​(int output)
      • getLabelStats

        protected List<S> getLabelStats()
      • fit

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

        public void revert​(@NonNull
                           @NonNull MultiDataSet 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
      • revertFeatures

        public void revertFeatures​(@NonNull
                                   @NonNull INDArray[] features)
        Undo (revert) the normalization applied by this normalizer to the features arrays
        Specified by:
        revertFeatures in interface MultiDataNormalization
        Parameters:
        features - Features to revert the normalization on
      • revertFeatures

        public void revertFeatures​(@NonNull
                                   @NonNull INDArray[] features,
                                   INDArray[] maskArrays)
        Undo (revert) the normalization applied by this normalizer to the features arrays
        Specified by:
        revertFeatures in interface MultiDataNormalization
        Parameters:
        features - Features to revert the normalization on
      • revertFeatures

        public void revertFeatures​(@NonNull
                                   @NonNull INDArray features,
                                   INDArray mask,
                                   int input)
        Undo (revert) the normalization applied by this normalizer to a specific features 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.
        Parameters:
        features - features arrays to revert the normalization on
        input - the index of the array to revert
      • 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 MultiDataNormalization
        Parameters:
        labels - Labels array to revert the normalization on
      • revertLabels

        public void revertLabels​(@NonNull
                                 @NonNull INDArray[] labels,
                                 INDArray[] labelsMask)
        Undo (revert) the normalization applied by this normalizer to the labels arrays. 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 MultiDataNormalization
        Parameters:
        labels - Labels arrays to revert the normalization on
        labelsMask - Labels mask array (may be null)
      • revertLabels

        public void revertLabels​(@NonNull
                                 @NonNull INDArray labels,
                                 INDArray mask,
                                 int output)
        Undo (revert) the normalization applied by this normalizer to a specific 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.
        Parameters:
        labels - Labels arrays to revert the normalization on
        output - the index of the array to revert
      • numInputs

        public int numInputs()
        Get the number of inputs
      • numOutputs

        public int numOutputs()
        Get the number of outputs