public class DoubleLLSVM extends java.lang.Object implements Classifier<double[]>
Locally Linear SVM, as described in:
Locally Linear Support Vector Machines
L'ubor Ladicky, Philip H.S. Torr
Procedings of the 28th ICML, Bellevue, WA, USA, 2011.
Constructor and Description |
---|
DoubleLLSVM() |
Modifier and Type | Method and Description |
---|---|
Classifier<double[]> |
copy()
Creates and returns a copy of this object.
|
double[] |
getB()
Return the model biases
|
double |
getC()
Returns the hyperparameter C for the hinge loss tradeoff
|
int |
getE()
Returns the number of epochs for training
|
int |
getK()
return the number of anchor points
|
int |
getNn()
Returns the number of anchor points taken into account by the model
|
double[][] |
getW()
Return the model hyperplanes
|
void |
setC(double c)
Sets the hyperparameter C for the hinge loss tradeoff
|
void |
setE(int e)
Sets the number of epochs for training
|
void |
setK(int k)
Sets the number of anchor points
|
void |
setNn(int nn)
Sets the number of anchor points taken into account by the model
|
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 Classifier<double[]> copy() throws java.lang.CloneNotSupportedException
Classifier
copy
in interface Classifier<double[]>
java.lang.CloneNotSupportedException
Object.clone()
public int getK()
public void setK(int k)
k
- the number of anchor pointspublic int getE()
public void setE(int e)
e
- the number of epochspublic double getC()
public void setC(double c)
c
- public int getNn()
public void setNn(int nn)
nn
- the number of anchor opintspublic double[][] getW()
public double[] getB()