## com.aliasi.matrix Interface KernelFunction

All Superinterfaces:
Proximity<Vector>
All Known Implementing Classes:

`public interface KernelFunctionextends 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.

Since:
LingPipe3.1
Version:
3.1
Author:
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

### proximity

```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>`
Parameters:
`v1` - First vector.
`v2` - Second vector.
Returns:
Kernel function applied to the vectors.