T - public class GradMKL<T> extends java.lang.Object implements Classifier<T>, KernelSVM<T>, MKL<T>
| Constructor and Description |
|---|
GradMKL() |
| Modifier and Type | Method and Description |
|---|---|
void |
addKernel(Kernel<T> k)
Adds a kernel to the MKL problem
|
GradMKL<T> |
copy()
Creates and returns a copy of this object.
|
double[] |
getAlphas()
Tells the weights of training samples
|
double |
getC()
Tells the hyperparameter C
|
KernelSVM<T> |
getClassifier()
Returns the classifier used by this MKL algorithm
|
java.util.ArrayList<java.lang.Double> |
getExampleWeights()
Tells the weights on examples
|
Kernel<T> |
getKernel()
Tells the current Kernel.
|
java.util.List<Kernel<T>> |
getKernels()
Returns the list of kernels
|
java.util.Map<Kernel<T>,java.lang.Double> |
getKernelWeightMap()
Gets a mapping of pairs
|
double[] |
getKernelWeights()
Gets an array containing the weights of the different kernels, in the
same order as getKernels()
|
double |
getMKLNorm()
Return the norm used for the regularization on the kernels
|
double |
getStopGap()
Returns the stopping criterion
|
java.util.Hashtable<Kernel<T>,java.lang.Double> |
getWeights()
Tells training samples and associated weights
|
void |
setC(double c)
Sets the hyperparameter C
|
void |
setClassifier(KernelSVM<T> cls)
Sets the default training algorithm for the underlying svm calls (default LASVM).
|
void |
setKernel(Kernel<T> k)
Sets the kernel to use as similarity measure
|
void |
setMKLNorm(double p)
Sets the norm used for kernel weights (real)
|
void |
setStopGap(double w)
Sets stopping criterion threshold
|
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 addKernel(Kernel<T> k)
MKLpublic 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 double getC()
public void setC(double c)
public void setMKLNorm(double p)
p - value of the normpublic void setStopGap(double w)
w - public java.util.ArrayList<java.lang.Double> getExampleWeights()
public double[] getKernelWeights()
MKLgetKernelWeights in interface MKL<T>public java.util.Hashtable<Kernel<T>,java.lang.Double> getWeights()
public void setClassifier(KernelSVM<T> cls)
cls - the algorithm used to solve the svm problempublic GradMKL<T> copy() throws java.lang.CloneNotSupportedException
copy in interface Classifier<T>java.lang.CloneNotSupportedExceptionObject.clone()public java.util.List<Kernel<T>> getKernels()
getKernels in interface MKL<T>public double getMKLNorm()
public double getStopGap()
public KernelSVM<T> getClassifier()
public java.util.Map<Kernel<T>,java.lang.Double> getKernelWeightMap()
MKLgetKernelWeightMap in interface MKL<T>public void setKernel(Kernel<T> k)
KernelSVMpublic double[] getAlphas()
KernelSVM