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

Class PolynomialTransform

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


    public class PolynomialTransform
    extends java.lang.Object
    implements DataTransform
    A transform for applying a polynomial transformation on the data set. As the dimension of the data set grows, the number of new features created by a polynomial transform grows rapidly. It is recommended only for small dimension problems using small degrees.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      PolynomialTransform(int degree)
      Creates a new polynomial transform of the given degree
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      DataTransform clone() 
      void fit(DataSet data)
      Fits this transform to the given dataset.
      int getDegree()
      Returns the polynomial degree to use
      void setDegree(int degree)
      Sets the degree of the polynomial to transform the input vector into
      DataPoint transform(DataPoint dp)
      Returns a new data point that is a transformation of the original data point.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PolynomialTransform

        public PolynomialTransform(int degree)
        Creates a new polynomial transform of the given degree
        Parameters:
        degree - the degree of the polynomial
        Throws:
        java.lang.ArithmeticException - if the degree is not greater than 1
    • Method Detail

      • 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
      • 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
      • setDegree

        public void setDegree(int degree)
        Sets the degree of the polynomial to transform the input vector into
        Parameters:
        degree - the positive degree to use
      • getDegree

        public int getDegree()
        Returns the polynomial degree to use
        Returns:
        the polynomial degree to use

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.