public class DoubleQNPKL extends java.lang.Object implements KernelSVM<double[]>, java.io.Serializable
Implementation of the QNPKL solver.
Original java code
Learning geometric combinations of Gaussian kernels with alternating Quasi-Newton algorithm
Picard, D. and Thome, N. and Cord, M and Rakotomamonjy, A.
Proceedings of the 20th ESANN conference, 2012, Bruges, 79-84
Constructor and Description |
---|
DoubleQNPKL()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
DoubleQNPKL |
copy()
Creates and returns a copy of this object.
|
double[] |
getAlphas()
Tells the weights of training samples
|
double |
getC()
Tells the hyperparameter C
|
java.util.List<java.lang.Double> |
getExampleWeights()
Tells weights of training samples
|
Kernel<double[]> |
getKernel()
Tells the current Kernel.
|
double[] |
getKernelWeights()
Tells weights of kernels as array
|
java.util.List<java.lang.Double> |
getListOfKernelWeights()
Tells weights of kernels
|
double |
getNum_cleaning()
Tells numerical cleaning threashold
|
double |
getPNorm()
Returns the p_norm parameters
|
double |
getStopGap()
Returns the stopping criterion
|
boolean |
isHasNorm()
Tells if use a norm constraint
|
void |
setC(double c)
Sets the hyperparameter C
|
void |
setHasNorm(boolean hasNorm)
Sets use of norm constraint
|
void |
setKernel(Kernel<double[]> k)
Sets the kernel to use as similarity measure
|
void |
setNum_cleaning(double num_cleaning)
Sets numerical threshold
|
void |
setPNorm(double p)
Sets norm constraint
|
void |
setStopGap(double w)
Sets stopping criterion
|
void |
train(java.util.List<TrainingSample<double[]>> l)
Replace the current training list and train the classifier
|
void |
train(TrainingSample<double[]> t)
Add a single example to the current training set and train the classifier
|
double |
valueOf(double[] e)
Computes the category of the provided example
|
public void train(TrainingSample<double[]> t)
Classifier
train
in interface Classifier<double[]>
t
- the training samplepublic void train(java.util.List<TrainingSample<double[]>> l)
Classifier
train
in interface Classifier<double[]>
l
- list of training samplespublic double valueOf(double[] e)
Classifier
valueOf
in interface Classifier<double[]>
e
- examplepublic double getC()
public void setC(double c)
public void setPNorm(double p)
public void setStopGap(double w)
public double getNum_cleaning()
public void setNum_cleaning(double num_cleaning)
public java.util.List<java.lang.Double> getExampleWeights()
public java.util.List<java.lang.Double> getListOfKernelWeights()
public double[] getKernelWeights()
public double[] getAlphas()
KernelSVM
public void setKernel(Kernel<double[]> k)
KernelSVM
public Kernel<double[]> getKernel()
KernelSVM
public boolean isHasNorm()
public void setHasNorm(boolean hasNorm)
public DoubleQNPKL copy() throws java.lang.CloneNotSupportedException
copy
in interface Classifier<double[]>
java.lang.CloneNotSupportedException
Object.clone()
public double getPNorm()
public double getStopGap()