Documentation of 'jsat.distributions.kernels.PolynomialKernel' Java class
PolynomialKernel
jsat.distributions.kernels

Class PolynomialKernel

    • Constructor Detail

      • PolynomialKernel

        public PolynomialKernel(double degree,
                                double alpha,
                                double c)
        Creates a new polynomial kernel
        Parameters:
        degree - the degree of the polynomial
        alpha - the term to scale the dot product by
        c - the additive term
      • PolynomialKernel

        public PolynomialKernel(double degree)
        Defaults alpha = 1 and c = 1
        Parameters:
        degree - the degree of the polynomial
    • Method Detail

      • setAlpha

        public void setAlpha(double alpha)
        Sets the scaling factor for the dot product, this is equivalent to multiplying each value in the data set by a constant factor
        Parameters:
        alpha - the scaling factor
      • setC

        public void setC(double c)
        Sets the additive term, when set to one this is equivalent to adding a bias term of 1 to each vector. This is done after the scaling by alpha.
        Parameters:
        c - the non negative additive term
      • setDegree

        public void setDegree(double d)
        Sets the degree of the polynomial
        Parameters:
        d - the degree of the polynomial
      • getAlpha

        public double getAlpha()
        Returns the scaling parameter
        Returns:
        the scaling parameter
      • getC

        public double getC()
        Returns the additive constant
        Returns:
        the additive constant
      • getDegree

        public double getDegree()
        Returns the degree of the polynomial
        Returns:
        the degree of the polynomial
      • eval

        public double eval(Vec a,
                           Vec b)
        Description copied from interface: KernelTrick
        Evaluate this kernel function for the two given vectors.
        Parameters:
        a - the first vector
        b - the first vector
        Returns:
        the evaluation
      • toString

        public java.lang.String toString()
        Description copied from interface: KernelTrick
        A descriptive name for the type of KernelFunction
        Specified by:
        toString in interface KernelTrick
        Overrides:
        toString in class java.lang.Object
        Returns:
        a descriptive name for the type of KernelFunction
      • guessDegree

        public static Distribution guessDegree(DataSet d)
        Guesses the distribution to use for the degree parameter
        Parameters:
        d - the dataset to get the guess for
        Returns:
        the guess for the degree parameter
        See Also:
        setDegree(double)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.