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

Class DataTransformProcess

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, DataTransform, Parameterized


    public class DataTransformProcess
    extends java.lang.Object
    implements DataTransform, Parameterized
    Performing a transform on the whole data set before training a classifier can add bias to the results. For proper evaluation, the transforms must be learned from the training set and not contain any knowledge from the testing set. A DataTransformProcess aids in this by providing a mechanism to contain several different transforms to learn and then apply.

    The Parameters of the Data Transform Process are the parameters from the individual transform factories that make up the whole process. The name "DataTransformProcess" will not be prefixed to the parameter names.
    See Also:
    Serialized Form
    • Constructor Detail

      • DataTransformProcess

        public DataTransformProcess()
        Creates a new transform process that is empty. Transform factories must be added using #addTransform(jsat.datatransform.DataTransformFactory) .
      • DataTransformProcess

        public DataTransformProcess(DataTransform... transforms)
        Creates a new transform process from the listed factories, which will be applied in order by index.
        Parameters:
        transforms - the array of factories to apply as the data transform process
    • Method Detail

      • addTransform

        public void addTransform(DataTransform transform)
        Adds a transform to the list of transforms. Transforms are learned and applied in the order in which they are added.
        Parameters:
        transform - the factory for the transform to add
      • getNumberOfTransforms

        public int getNumberOfTransforms()
        Returns:
        the number of transforms currently chained in this transform process
      • fit

        public void fit(DataSet data)
        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:
        data - the dataset to fir this transform to
      • leanTransforms

        public void leanTransforms(DataSet dataSet)
        Learns the transforms for the given data set. The data set will not be altered. Once finished, this DataTransformProcess can be applied to the dataSet to get the transformed data set.
        Parameters:
        dataSet - the data set to learn a series of transforms from
      • learnApplyTransforms

        public void learnApplyTransforms(DataSet dataSet)
        Learns the transforms for the given data set. The data set is then altered after each transform is learned so the next transform can be learned as well.
        The results are equivalent to calling learnApplyTransforms(jsat.DataSet) on the data set and then calling DataSet.applyTransform(jsat.datatransform.DataTransform) with this DataTransformProces.
        Parameters:
        dataSet - the data set to learn a series of transforms from and alter into the final transformed form
      • 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

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.