|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.lip6.kernel.Kernel<T>
fr.lip6.kernel.adaptative.ThreadedSumKernel<T>
T - public class ThreadedSumKernel<T>
Major kernel computed as a weighted sum of minor kernels :
K = w_i * k_i
Computation of the kernel matrix is done by running a thread on sub matrices.
The number of threads is choosen as function of the number of available cpus.
| Field Summary | |
|---|---|
protected int |
numThread
|
| Fields inherited from class fr.lip6.kernel.Kernel |
|---|
name |
| Constructor Summary | |
|---|---|
ThreadedSumKernel()
|
|
ThreadedSumKernel(java.util.Hashtable<Kernel<T>,java.lang.Double> h)
Sets the weights to h. |
|
| Method Summary | |
|---|---|
void |
addKernel(Kernel<T> k)
adds a kernel to the sum with weight 1.0 |
void |
addKernel(Kernel<T> k,
double d)
adds a kernel to the sum with weight d |
double[][] |
getKernelMatrix(java.util.ArrayList<TrainingSample<T>> e)
return the Gram Matrix of this kernel computed on given samples |
double |
getWeight(Kernel<T> k)
gets the weights of kernel k |
java.util.Hashtable<Kernel<T>,java.lang.Double> |
getWeights()
get the list of kernels and associated weights. |
void |
removeKernel(Kernel<T> k)
removes kernel k from the sum |
void |
setWeight(Kernel<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 |
| Methods inherited from class fr.lip6.kernel.Kernel |
|---|
getNormalizedKernelMatrix, normalizedValueOf, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int numThread
| Constructor Detail |
|---|
public ThreadedSumKernel()
public ThreadedSumKernel(java.util.Hashtable<Kernel<T>,java.lang.Double> h)
h - | Method Detail |
|---|
public void addKernel(Kernel<T> k)
k -
public void addKernel(Kernel<T> k,
double d)
k - d - public void removeKernel(Kernel<T> k)
k - public double getWeight(Kernel<T> k)
k -
public void setWeight(Kernel<T> k,
java.lang.Double d)
k - d -
public double valueOf(T t1,
T t2)
Kernel
valueOf in class Kernel<T>t1 - first elementt2 - second element
public double valueOf(T t1)
Kernel
valueOf in class Kernel<T>t1 - the element to compute the similarity to zeropublic java.util.Hashtable<Kernel<T>,java.lang.Double> getWeights()
public double[][] getKernelMatrix(java.util.ArrayList<TrainingSample<T>> e)
Kernel
getKernelMatrix in class Kernel<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||