T
- public class GaussianProductKernel<T> extends Kernel<T>
Modifier and Type | Field and Description |
---|---|
protected int |
numThread |
Constructor and Description |
---|
GaussianProductKernel() |
GaussianProductKernel(java.util.Map<GaussianKernel<T>,java.lang.Double> h)
Sets the weights to h.
|
Modifier and Type | Method and Description |
---|---|
void |
addKernel(GaussianKernel<T> k)
adds a kernel to the sum with weight 1.0
|
void |
addKernel(GaussianKernel<T> k,
double d)
adds a kernel to the product with weight d
|
double[][] |
getKernelMatrix(java.util.List<TrainingSample<T>> list)
return the Gram Matrix of this kernel computed on given samples
|
double |
getWeight(GaussianKernel<T> k)
gets the weights of kernel k
|
java.util.Map<GaussianKernel<T>,java.lang.Double> |
getWeights()
get the list of kernels and associated weights.
|
void |
removeKernel(GaussianKernel<T> k)
removes kernel k from the product
|
void |
setWeight(GaussianKernel<T> k,
java.lang.Double d)
Sets the weight of kernel k
|
double |
valueOf(T t1)
kernel similarity to zero
|
double |
valueOf(T t1,
T t2)
compute the kernel similarity between two element of input space
|
getNormalizedKernelMatrix, normalizedValueOf, setName, toString
public GaussianProductKernel()
public GaussianProductKernel(java.util.Map<GaussianKernel<T>,java.lang.Double> h)
h
- public void addKernel(GaussianKernel<T> k)
k
- public void addKernel(GaussianKernel<T> k, double d)
k
- d
- public void removeKernel(GaussianKernel<T> k)
k
- public double getWeight(GaussianKernel<T> k)
k
- public void setWeight(GaussianKernel<T> k, java.lang.Double d)
k
- d
- public double valueOf(T t1, T t2)
Kernel
public java.util.Map<GaussianKernel<T>,java.lang.Double> getWeights()
public double[][] getKernelMatrix(java.util.List<TrainingSample<T>> list)
Kernel
getKernelMatrix
in class Kernel<T>
list
- list of samples on which to compute the Gram matrix