T - Data type of input spacepublic abstract class Kernel<T>
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
name |
| Constructor and Description |
|---|
Kernel() |
| Modifier and Type | Method and Description |
|---|---|
double[][] |
getKernelMatrix(java.util.List<TrainingSample<T>> l)
return the Gram Matrix of this kernel computed on given samples
|
double[][] |
getNormalizedKernelMatrix(java.util.ArrayList<TrainingSample<T>> e)
return the Gram Matrix of this kernel computed on given samples, with similarities of one element to itself normalized to one.
|
double |
normalizedValueOf(T t1,
T t2)
kernel similarity normalized such that k(t1, t1) = 1
|
void |
setName(java.lang.String n)
Set the name of this kernel
|
java.lang.String |
toString()
return the name of this kernel
|
abstract double |
valueOf(T t1)
kernel similarity to zero
|
abstract double |
valueOf(T t1,
T t2)
compute the kernel similarity between two element of input space
|
public abstract double valueOf(T t1, T t2)
t1 - first elementt2 - second elementpublic abstract double valueOf(T t1)
t1 - the element to compute the similarity to itselfpublic double normalizedValueOf(T t1, T t2)
t1 - first elementt2 - second elementpublic double[][] getKernelMatrix(java.util.List<TrainingSample<T>> l)
l - list of samples on which to compute the Gram matrixpublic double[][] getNormalizedKernelMatrix(java.util.ArrayList<TrainingSample<T>> e)
e - the list of samplespublic void setName(java.lang.String n)
n - public java.lang.String toString()
toString in class java.lang.Object