|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.matrix.PolynomialKernel
public class PolynomialKernel
A PolynomialKernel provides a dot product over a fixed
degree polynomial basis expansion of a vector.
The polynomial kernel of degree d over vectors
v1 and v2 is defined in terms of
underlying vector dot products:
wherekernel(v1,v2) = (1 + v1 * v2)d
v1 * v2 is shorthand for the method call
v1.dotProduct(v2).
A polynomial kernel may be serialized.
A thorough discussion of kernel functions and kernel-based classifiers may be found in:
| Constructor Summary | |
|---|---|
PolynomialKernel(int degree)
Construct a polynomial kernel function of the specified degree. |
|
| Method Summary | |
|---|---|
double |
proximity(Vector v1,
Vector v2)
Returns the result of applying the polynomial kernel of this class's degree to the specified vectors. |
String |
toString()
Returns a string-based representation of this kernel function, including the kernel type and degree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PolynomialKernel(int degree)
degree - Degree of the polynomial kernel.| Method Detail |
|---|
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.public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||