Interface KernelFunction

All Superinterfaces:
All Known Implementing Classes:
DotProductKernel, GaussianRadialBasisKernel, HyperbolicTangentKernel, PolynomialKernel

public interface KernelFunction
extends Proximity<Vector>

A KernelFunction computes real-valued proximities between vectors. Note that proximity runs in the reverse direction from distance: the more similar two vectors are, the greater their proximity.

Implementations of the standard kernel functions used for machine learning are provided in this package, including DotProductKernel, PolynomialKernel, GaussianRadialBasisKernel, and HyperbolicTangentKernel. See those classes' documentation for definitions of the specific kernel functions.

Typically kernel functions will be functions that could, in theory, be represented by inner products of vectors f(v), where f maps an n-dimensional input vector to an m-dimensional or even infinite-dimensional vector f(v). The kernel function is then defined as kernel(v1,v2) = f(v1) * f(v2), where f(v) is the embedding function and * represents the dot-product.

The use of kernel functions is usually for the so-called "kernel trick", which allows classification or clustering in high-dimensional spaces by embedding a lower-dimensional space and then working with linear combinations of kernel function results.

Bob Carpenter

Method Summary
 double proximity(Vector v1, Vector v2)
          Return the result of applying the kernel function to the specified pair of vectors.

Method Detail


double proximity(Vector v1,
                 Vector v2)
Return the result of applying the kernel function to the specified pair of vectors.

Specified by:
proximity in interface Proximity<Vector>
v1 - First vector.
v2 - Second vector.
Kernel function applied to the vectors.