Class DyadMinMaxScaler

  • All Implemented Interfaces:
    java.io.Serializable

    public class DyadMinMaxScaler
    extends AbstractDyadScaler
    A scaler that can be fit to a certain dataset and then be used to normalize dyad datasets, i.e. transform the data such that the values of each feature lie between 0 and 1. For feature x: x = x - x_min / (x_max - x_min)
    See Also:
    Serialized Form
    • Constructor Detail

      • DyadMinMaxScaler

        public DyadMinMaxScaler()
    • Method Detail

      • untransformInstances

        public void untransformInstances​(DyadRankingDataset dataset)
        Undoes the transformation of the instances of each dyad.
        Parameters:
        dataset -
      • untransformInstances

        public void untransformInstances​(DyadRankingDataset dataset,
                                         int decimals)
        Undoes the transformation of the instances of each dyad.
        Parameters:
        dataset -
        decimals - number of decimal places for rounding
      • untransformInstance

        public void untransformInstance​(Dyad dyad)
        Undoes the transformation of the instance of a single dyad.
        Parameters:
        dyad -
      • untransformInstance

        public void untransformInstance​(Dyad dyad,
                                        int decimals)
        Undoes the transformation of the instance of a single dyad.
        Parameters:
        dyad -
        decimals - number of decimal places for rounding
      • untransformAlternatives

        public void untransformAlternatives​(DyadRankingDataset dataset)
        Undoes the transformation of the alternatives of each dyad.
        Parameters:
        dataset -
      • untransformAlternatives

        public void untransformAlternatives​(DyadRankingDataset dataset,
                                            int decimals)
        Undoes the transformation of the alternatives of each dyad.
        Parameters:
        dataset -
        decimals - number of de
      • untransformAlternative

        public void untransformAlternative​(Dyad dyad)
        Undoes the transformation on the alternative of a single dyad.
        Parameters:
        dyad -
      • untransformAlternative

        public void untransformAlternative​(Dyad dyad,
                                           int decimals)
        Undoes the transformation on the alternative of a single dyad.
        Parameters:
        dyad -
      • getPrettyMaximaString

        public java.lang.String getPrettyMaximaString()
        Returns a String the maxima of all features this scaler has been fit to.
      • getPrettyMinimaString

        public java.lang.String getPrettyMinimaString()
        Returns a String for the minima of all features this scaler has been fit to.
      • transformInstances

        public void transformInstances​(Dyad dyad,
                                       java.util.List<java.lang.Integer> ignoredIndices)
        Description copied from class: AbstractDyadScaler
        Transforms only the instances of each dyad according to the mean and standard deviation of the data the scaler has been fit to. The attributes with indices contained in ignoredIndices are not transformed. {
        Specified by:
        transformInstances in class AbstractDyadScaler
        ignoredIndices - The List of indices that are been ignored by the scaler.
      • transformAlternatives

        public void transformAlternatives​(Dyad dyad,
                                          java.util.List<java.lang.Integer> ignoredIndices)
        Description copied from class: AbstractDyadScaler
        Transforms only the alternatives of each dyad according to the mean and standard deviation of the data the scaler has been fit to.
        Specified by:
        transformAlternatives in class AbstractDyadScaler
        ignoredIndices - The List of indices that are been ignored by the scaler.
      • transformInstaceVector

        public void transformInstaceVector​(ai.libs.jaicore.math.linearalgebra.Vector vector,
                                           java.util.List<java.lang.Integer> ignoredIndices)
        Description copied from class: AbstractDyadScaler
        Transforms an instance feature vector.
        Specified by:
        transformInstaceVector in class AbstractDyadScaler