Class GaussianKernel

  • All Implemented Interfaces:, Kernel

    public class GaussianKernel
    extends java.lang.Object
    implements Kernel
    Gaussian Kernel or RBF kernel. Follows the form: K(x,y) = e(||x-y||^2 / (2*s^2)), where s is a parameter of this kernel, aka as sigma or standard deviation.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructor Description
      GaussianKernel​(double sigma)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double eval​(Matrix A, Matrix B)
      Evaluates a kernel between the two Vectors .
      • Methods inherited from class java.lang.Object

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

      • GaussianKernel

        public GaussianKernel​(double sigma)
    • Method Detail

      • eval

        public double eval​(Matrix A,
                           Matrix B)
        Description copied from interface: Kernel
        Evaluates a kernel between the two Vectors .
        Specified by:
        eval in interface Kernel
        A - The first pattern to calculate the kernel
        B - The second pattern to calculate the kernel
        A double with the value of the calculated kernel