com.aliasi.matrix

• All Implemented Interfaces:
KernelFunction, Proximity<Vector>, Serializable

extends Object
implements KernelFunction, Serializable
A GaussianRadialBasisKernel provides a kernel based on a Gaussian radial basis function with a fixed variance parameter. As a kernel function, it unfolds into an infinite-dimension Hilbert space.

The radial basis kernel function of radius r is defined between vectors v1 and v2 as follows:

rbf(v1,v2) = exp(- r * distance(v1,v2)2)

where distance(v1,v2) is the Euclidean distance, as defined in the class documentation for EuclideanDistance. In this formulation, the radius r is related to the variance σ2 by:
r = 1/(2 * σ2)

Since:
LingPipe3.1
Version:
3.8
Author:
Bob Carpenter
Serialized Form
• ### Constructor Summary

Constructors
Constructor and Description
Construct a Gaussian radial basis kernel with the specified radius of influence.
• ### Constructor Detail

Construct a Gaussian radial basis kernel with the specified radius of influence.
Parameters:
• ### Method Detail

• #### proximity

public double proximity(Vector v1,
Vector v2)
Returns the result of applying this Guassian radial basis kernel to the specified vectors. See the class documentation above for a full definition.
Specified by:
proximity in interface KernelFunction
Specified by:
proximity in interface Proximity<Vector>
Parameters:
v1 - First vector.
v2 - Second vector.
Returns:
Kernel function applied to the two vectors.
Throws:
IllegalArgumentException - If the vectors are not of the same dimensionality.
• #### toString

public String toString()
Returns a string-based representation of this kernel function, including the kernel type and radius.
Overrides:
toString in class Object
Returns:
A string representing this kernel.