public class SequentialMKL<T> extends java.lang.Object implements KernelSVM<T>, MKL<T>, java.io.Serializable
Constructor and Description |
---|
SequentialMKL() |
Modifier and Type | Method and Description |
---|---|
void |
addKernel(Kernel<T> kernel)
Adds a kernel to the MKL problem
|
Classifier<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()
Gets an array of the kernels in the set, in the same order as
getKernelWeights()
|
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()
|
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)
Classifier
train
in interface Classifier<T>
t
- the training samplepublic void train(java.util.List<TrainingSample<T>> l)
Classifier
train
in interface Classifier<T>
l
- list of training samplespublic double valueOf(T e)
Classifier
valueOf
in interface Classifier<T>
e
- examplepublic Classifier<T> copy() throws java.lang.CloneNotSupportedException
Classifier
copy
in interface Classifier<T>
java.lang.CloneNotSupportedException
Object.clone()
public Kernel<T> getKernel()
KernelSVM
public void setKernel(Kernel<T> k)
KernelSVM
public double[] getAlphas()
KernelSVM
public void setC(double c)
KernelSVM
public double getC()
KernelSVM
public double[] getKernelWeights()
MKL
getKernelWeights
in interface MKL<T>
public java.util.List<Kernel<T>> getKernels()
MKL
getKernels
in interface MKL<T>
public java.util.Map<Kernel<T>,java.lang.Double> getKernelWeightMap()
MKL
getKernelWeightMap
in interface MKL<T>