Documentation of 'jsat.datatransform.LinearTransform' Java class
LinearTransform
jsat.datatransform

Class LinearTransform

    • Constructor Detail

      • LinearTransform

        public LinearTransform()
        Creates a new Linear Transformation that will scale values to the [0, 1] range.
      • LinearTransform

        public LinearTransform(DataSet dataSet)
        Creates a new Linear Transformation for the input data set so that all values are in the [0, 1] range.
        Parameters:
        dataSet - the data set to learn the transform from
      • LinearTransform

        public LinearTransform(double A,
                               double B)
        Creates a new Linear Transformation.
        Parameters:
        dataSet - the data set to learn the transform from
        A - the maximum value for the transformed data set
        B - the minimum value for the transformed data set
      • LinearTransform

        public LinearTransform(DataSet dataSet,
                               double A,
                               double B)
        Creates a new Linear Transformation for the input data set.
        Parameters:
        dataSet - the data set to learn the transform from
        A - the maximum value for the transformed data set
        B - the minimum value for the transformed data set
    • Method Detail

      • setRange

        public void setRange(double A,
                             double B)
        Sets the min and max value to scale the data to. If given in the wrong order, this method will swap them
        Parameters:
        A - the maximum value for the transformed data set
        B - the minimum value for the transformed data set
      • fit

        public void fit(DataSet dataSet)
        Description copied from interface: DataTransform
        Fits this transform to the given dataset. Some transforms can only be learned from classification or regression datasets. If an incompatible dataset type is given, a FailedToFitException exception may be thrown.
        Specified by:
        fit in interface DataTransform
        Parameters:
        dataSet - the dataset to fir this transform to
      • transform

        public DataPoint transform(DataPoint dp)
        Description copied from interface: DataTransform
        Returns a new data point that is a transformation of the original data point. This new data point is a different object, but may contain the same references as the original data point. It is not guaranteed that you can mutate the transformed point without having a side effect on the original point.
        Specified by:
        transform in interface DataTransform
        Parameters:
        dp - the data point to apply a transformation to
        Returns:
        a transformed data point
      • mutatesNominal

        public boolean mutatesNominal()
        Description copied from interface: InPlaceTransform
        By default returns false. Only returns true if this transform will mutableTransform the nominal feature values of a data point.
        Specified by:
        mutatesNominal in interface InPlaceTransform
        Returns:
        true if nominal feature values are mutated, false otherwise.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.