S
- The datatype of key (usually String or Integer)T
- The data type of input spacepublic final class IndexedCacheKernel<S,T> extends Kernel<S>
Simple method of pair
A unique Key is assigned to each sample, and similarities between two samples are cached in Hashmaps using the keys.
Warning: Safety granted by assertion. Disable assertion for a faster but riskier execution.
Constructor and Description |
---|
IndexedCacheKernel(Kernel<T> k,
java.util.Map<S,T> signatures)
Constructor using an underlying kernel and a map of
|
Modifier and Type | Method and Description |
---|---|
double[][] |
getCacheMatrix() |
java.util.Map<S,java.lang.Integer> |
getMap() |
double |
valueOf(S t1)
kernel similarity to zero
|
double |
valueOf(S t1,
S t2)
compute the kernel similarity between two element of input space
|
getKernelMatrix, getNormalizedKernelMatrix, normalizedValueOf, setName, toString
public final double valueOf(S t1, S t2)
Kernel
public java.util.Map<S,java.lang.Integer> getMap()
public double[][] getCacheMatrix()