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

Class SigmoidKernel

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


    public class SigmoidKernel
    extends BaseKernelTrick
    Provides an implementation of the Sigmoid (Hyperbolic Tangent) Kernel, which is of the form:
    k(x, y) = tanh(alpha * < x, y > +c)
    Technically, this kernel is not positive definite.
    See Also:
    Serialized Form
    • Constructor Detail

      • SigmoidKernel

        public SigmoidKernel(double alpha,
                             double C)
        Creates a new Sigmoid Kernel
        Parameters:
        alpha - the scaling factor for the dot product
        C - the additive constant
      • SigmoidKernel

        public SigmoidKernel(double alpha)
        Creates a new Sigmoid Kernel with a bias term of 1
        Parameters:
        alpha - the scaling factor for the dot product
    • 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
      • getAlpha

        public double getAlpha()
        Returns the scaling parameter
        Returns:
        the scaling parameter
      • 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
      • getC

        public double getC()
        Returns the additive constant
        Returns:
        the additive constant
      • 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
      • guessAlpha

        public static Distribution guessAlpha(DataSet d)
        Guesses a distribution for the α parameter
        Parameters:
        d - the data to get the guess for
        Returns:
        a distribution for the α parameter
      • guessC

        public static Distribution guessC(DataSet d)
        Guesses a distribution for the α parameter
        Parameters:
        d - the data to get the guess for
        Returns:
        a distribution for the α parameter

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.