public class LaSVMI<T> extends java.lang.Object implements KernelSVM<T>
Kernel SVM classifier implementing LaSVM-I algorithm
Nonconvex Online Support Vector Machines
Seyda Ertekin, Leon Bottou and C. Lee Giles
IEEE Transaction on Pattern Analysis and Machine Intelligence, 33(2):368–381,
Feb 2011
Constructor and Description |
---|
LaSVMI(Kernel<T> k)
Default constructor provideing the kernel
|
Modifier and Type | Method and Description |
---|---|
LaSVMI<T> |
copy()
Creates and returns a copy of this object.
|
double[] |
getAlphas()
Tells support vectors coefficients in order of the training list
|
double |
getC()
Tells the C hyperparameter
|
long |
getE()
Tells the number of epochs of training (default 2)
|
Kernel<T> |
getKernel()
Returns the kernel used by this classifier
|
double |
getS()
Tells the parameter s of the ramp loss (default -1)
|
void |
setC(double c)
Sets the C hyperparameter (default 1.0)
|
void |
setE(long e)
Sets the number of epoch of training (default 2)
|
void |
setKernel(Kernel<T> kernel)
Set the kernel to use
|
void |
setS(double s)
Sets the parameter s of the ramp loss (default -1)
|
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 double getC()
public void setC(double c)
public long getE()
public void setE(long e)
e
- Epublic double[] getAlphas()
public double getS()
public void setS(double s)
s
- spublic LaSVMI<T> copy() throws java.lang.CloneNotSupportedException
copy
in interface Classifier<T>
java.lang.CloneNotSupportedException
Object.clone()