it.uniroma2.sag.kelp.kernel.standard

## Class RbfKernel

• public class RbfKernel
extends KernelComposition
Given a kernel K, the RBF formula Kr is:
$$Kr(x,y) = e^{-\gamma * \left \lVert x-y \right \rVert ^2}$$ where:
$$\left\lVert a \right\rVert$$ is the norm of a in the kernel space K, thus $$\left\lVert x-y \right\rVert ^2$$ can be computed as:
$$\left\lVert x-y \right\rVert ^2 = \left\lVert x \right\rVert ^2 + \left\lVert y \right\rVert ^2 - 2K(x,y) = K(x,x) + K(y,y) - 2K(x,y)$$
Author:
Simone Filice
• ### Constructor Detail

• #### RbfKernel

public RbfKernel(float gamma,
Kernel inputSpace)
• #### RbfKernel

public RbfKernel()
• ### Method Detail

• #### getGamma

public float getGamma()
Returns:
the gamma
• #### setGamma

public void setGamma(float gamma)
Parameters:
gamma - the gamma to set
• #### kernelComputation

protected float kernelComputation(Example exA,
Example exB)
Description copied from class: Kernel
Returns the kernel similarity between the given examples. This corresponds to the inner product in the implicit Reproducing Kernel Hilbert Space (RKHS)
Specified by:
kernelComputation in class Kernel
Parameters:
exA - the first example
exB - the second example
Returns:
the kernel operation between exA and exB