Class GaussianKernel

  • All Implemented Interfaces:
    java.io.Serializable, MercerKernel<double[]>

    public class GaussianKernel
    extends java.lang.Object
    implements MercerKernel<double[]>
    The Gaussian Mercer Kernel. k(u, v) = e-||u-v||2 / (2 * σ2), where σ > 0 is the scale parameter of the kernel.

    The Gaussian kernel is a good choice for a great deal of applications, although sometimes it is remarked as being overused.

    Author:
    Haifeng Li
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      GaussianKernel​(double sigma)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double k​(double[] x, double[] y)
      Kernel function.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GaussianKernel

        public GaussianKernel​(double sigma)
        Constructor.
        Parameters:
        sigma - the smooth/width parameter of Gaussian kernel.
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • k

        public double k​(double[] x,
                        double[] y)
        Description copied from interface: MercerKernel
        Kernel function.
        Specified by:
        k in interface MercerKernel<double[]>