public final class LaSVM<T> extends java.lang.Object implements KernelSVM<T>, java.io.Serializable, OnlineClassifier<T>
Kernel SVM classifier implementing the LaSVM algorithm
Fast Kernel Classifiers with Online and Active Learning
Antoine Bordes, Seyda Ertekin, Jason Weston and Léon Bottou
Journal of Machine Learning Research, 6:1579-1619, September 2005.
| Constructor and Description |
|---|
LaSVM(Kernel<T> k)
Constructor with specific kernel
|
| Modifier and Type | Method and Description |
|---|---|
LaSVM<T> |
copy()
Creates and returns a copy of this object.
|
double[] |
getAlphas()
Tells the array of support vector coefficients
|
double |
getB()
Tells the bias term
|
double |
getC()
Tells the hyperparamter C
|
int |
getE()
Tells the number of epochs used for training
|
Kernel<T> |
getKernel()
Tells the kernel used by this classifier
|
double |
getTau()
Tells the numerical precision
|
void |
onlineTrain(TrainingSampleStream<T> stream)
Train the classifier using a stream of TrainingSample sampled from the
TrainingSampleStream until no sample can be drawn.
|
void |
retrain() |
void |
setB(double b)
Sets the bias term
|
void |
setC(double c)
Sets the hyperparameter C
|
void |
setE(int e)
Sets the number of epochs used for training
|
void |
setKernel(Kernel<T> kernel)
Sets the kernel used by this classifier
|
void |
train(java.util.List<TrainingSample<T>> l)
Replace the current training list and train the classifier
|
void |
train(TrainingSample<T> t)
Deprecated.
|
double |
valueOf(T e)
Computes the category of the provided example
|
@Deprecated public void train(TrainingSample<T> t)
OnlineClassifiertrain in interface OnlineClassifier<T>t - the training samplepublic void train(java.util.List<TrainingSample<T>> l)
Classifiertrain in interface Classifier<T>l - list of training samplespublic void onlineTrain(TrainingSampleStream<T> stream)
OnlineClassifieronlineTrain in interface OnlineClassifier<T>stream - the TrainingSampleStream from which the samples are drawn.public void retrain()
public final double valueOf(T e)
ClassifiervalueOf in interface Classifier<T>e - examplepublic double getC()
public void setC(double c)
public int getE()
public void setE(int e)
e - the number of epochspublic double getTau()
public double[] getAlphas()
public double getB()
public void setB(double b)
b - the new bias termpublic LaSVM<T> copy() throws java.lang.CloneNotSupportedException
copy in interface Classifier<T>java.lang.CloneNotSupportedExceptionObject.clone()