public class CustomMatrixKernel extends Kernel<java.lang.Integer>
Kernel with a provided custom matrix.
The datatype of input space is integer relative to row/column indices. Therefore, the similarity
between elements i and j is matrix[i][j].
If i or j is not in the range of the matrix, 0 is returned.
Constructor and Description |
---|
CustomMatrixKernel(double[][] matrix)
Constructor using the supplied Gram matrix.
|
Modifier and Type | Method and Description |
---|---|
double |
valueOf(java.lang.Integer t1)
kernel similarity to zero
|
double |
valueOf(java.lang.Integer t1,
java.lang.Integer t2)
compute the kernel similarity between two element of input space
|
getKernelMatrix, getNormalizedKernelMatrix, normalizedValueOf, setName, toString
public CustomMatrixKernel(double[][] matrix)
matrix
- the Gram matrix of underlying kernel function.public double valueOf(java.lang.Integer t1, java.lang.Integer t2)
Kernel