public class DotProductKernel extends Object implements KernelFunction, Serializable
DotProductKernel is the trivial kernel function
computed by taking the dot product of the input vectors. The
dot-product kernel is, for instance, the kernel to use for the
ordinary (non-kernel) perceptron. Typically, this kernel is used
as a baseline, as polynomial and radial basis kernels tend to
perform better in practice for classification and clustering
problems.| Constructor and Description |
|---|
DotProductKernel()
Construct a dot-product kernel.
|
| Modifier and Type | Method and Description |
|---|---|
double |
proximity(Vector v1,
Vector v2)
Returns the dot product of the input vectors.
|
String |
toString()
Returns a string-based representation of this kernel.
|
public String toString()
public double proximity(Vector v1, Vector v2)
proximity in interface KernelFunctionproximity in interface Proximity<Vector>v1 - First vector.v2 - Second vector.IllegalArgumentException - If the vectors are not of the
same dimensionality.Copyright © 2019 Alias-i, Inc.. All rights reserved.