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

Class WhitenedPCA

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, DataTransform, Parameterized
    Direct Known Subclasses:
    WhitenedZCA


    public class WhitenedPCA
    extends DataTransformBase
    An extension of PCA that attempts to capture the variance, and make the variables in the output space independent from each-other. An of equal scale, so that the covariance is equal to I. The results may be further from the identity matrix than desired as the target dimension shrinks

    The Whitened PCA is more computational expensive than the normal PCA algorithm, but transforming the data takes the same time.
    See Also:
    Serialized Form
    • Constructor Detail

      • WhitenedPCA

        public WhitenedPCA()
        Creates a new WhitenedPCA transform that uses up to 50 dimensions for the transformed space. This may not be optimal for any given dataset.
        Parameters:
        dims - the number of dimensions to project down to
      • WhitenedPCA

        public WhitenedPCA(int dims)
        Creates a new WhitenedPCA transform
        Parameters:
        dims - the number of dimensions to project down to
      • WhitenedPCA

        public WhitenedPCA(double regularization,
                           int dims)
        Creates a new WhitenedPCA transform
        Parameters:
        regularization - the amount of regularization to add, avoids numerical instability
        dims - the number of dimensions to project down to
      • WhitenedPCA

        public WhitenedPCA(DataSet dataSet,
                           double regularization,
                           int dims)
        Creates a new WhitenedPCA from the given dataset
        Parameters:
        dataSet - the data set to whiten
        regularization - the amount of regularization to add, avoids numerical instability
        dims - the number of dimensions to project down to
      • WhitenedPCA

        public WhitenedPCA(DataSet dataSet,
                           double regularization)
        Creates a new WhitenedPCA, the dimensions will be chosen so that the subset of dimensions is of full rank.
        Parameters:
        dataSet - the data set to whiten
        regularization - the amount of regularization to add, avoids numerical instability
      • WhitenedPCA

        public WhitenedPCA(DataSet dataSet)
        Creates a new WhitenedPCA. The dimensions will be chosen so that the subset of dimensions is of full rank. The regularization parameter will be chosen as the log of the condition of the covariance.
        Parameters:
        dataSet - the data set to whiten
      • WhitenedPCA

        public WhitenedPCA(DataSet dataSet,
                           int dims)
        Creates a new WhitenedPCA. The regularization parameter will be chosen as the log of the condition of the covariance.
        Parameters:
        dataSet - the data set to whiten
        dims - the number of dimensions to project down to
    • Method Detail

      • 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.
        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.
        Parameters:
        dp - the data point to apply a transformation to
        Returns:
        a transformed data point
      • setRegularization

        public void setRegularization(double regularization)
        Parameters:
        regularization - the regularization to apply to the diagonal of the decomposition. This can improve numeric stability and reduces noise.
      • getRegularization

        public double getRegularization()
        Returns:
        the amount of regularization to apply
      • setDimensions

        public void setDimensions(int dimensions)
        Sets the number of dimensions to project down to
        Parameters:
        dimensions - the feature size to project down to
      • getDimensions

        public int getDimensions()
        Returns the number of dimensions to project down to
        Returns:
        the number of dimensions to project down to

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.