public class TSMKL<T> extends java.lang.Object implements KernelSVM<T>, MKL<T>
Implementation of the Two-Stages MKL solver by Abhishek Kumar et al.
This is a original implementation using the tools available in JKernelMachines,
and not a Java conversion of the original matlab code.
A Binary Classification Framework for Two-Stage Multiple Kernel Learning
Abhishek Kumar, Alexandru Niculescu-Mizil, Koray Kavukcoglu, Hal Daumé,
ICML 2012.
| Constructor and Description |
|---|
TSMKL() |
| Modifier and Type | Method and Description |
|---|---|
void |
addKernel(Kernel<T> k)
Adds a kernel to the combination
|
TSMKL<T> |
copy()
Creates and returns a copy of this object.
|
double[] |
getAlphas()
Tells the weights of training samples
|
double |
getC()
Tells the hyperparameter C
|
Kernel<T> |
getKernel()
Tells the current Kernel.
|
java.util.List<Kernel<T>> |
getKernels()
Return the list of kernels used by this MKL algorithm
|
java.util.Map<Kernel<T>,java.lang.Double> |
getKernelWeightMap()
Gets a mapping of pairs
|
double[] |
getKernelWeights()
tells the weights of the kernel combination
|
void |
setC(double c)
Sets the hyperparameter C
|
void |
setKernel(Kernel<T> k)
Sets the kernel to use as similarity measure
|
void |
train(java.util.List<TrainingSample<T>> l)
Replace the current training list and train the classifier
|
void |
train(TrainingSample<T> t)
Add a single example to the current training set and train the classifier
|
double |
valueOf(T e)
Computes the category of the provided example
|
public void train(TrainingSample<T> t)
Classifiertrain in interface Classifier<T>t - the training samplepublic void train(java.util.List<TrainingSample<T>> l)
Classifiertrain in interface Classifier<T>l - list of training samplespublic double valueOf(T e)
ClassifiervalueOf in interface Classifier<T>e - examplepublic TSMKL<T> copy() throws java.lang.CloneNotSupportedException
Classifiercopy in interface Classifier<T>java.lang.CloneNotSupportedExceptionObject.clone()public void setKernel(Kernel<T> k)
KernelSVMpublic double[] getAlphas()
KernelSVMpublic void setC(double c)
KernelSVMpublic double getC()
KernelSVMpublic double[] getKernelWeights()
getKernelWeights in interface MKL<T>public java.util.List<Kernel<T>> getKernels()
getKernels in interface MKL<T>public java.util.Map<Kernel<T>,java.lang.Double> getKernelWeightMap()
MKLgetKernelWeightMap in interface MKL<T>