Package smile.base.svm
Class LASVM<T>
java.lang.Object
smile.base.svm.LASVM<T>
- Type Parameters:
T
- the data type of model input objects.
- All Implemented Interfaces:
Serializable
LASVM is an approximate SVM solver that uses online approximation.
It reaches accuracies similar to that of a real SVM after performing
a single sequential pass through the training examples. Further
benefits can be achieved using selective sampling techniques to
choose which example should be considered next.
LASVM requires considerably less memory than a regular SVM solver.
This becomes a considerable speed advantage for large training sets.
- See Also:
-
Constructor Summary
ConstructorDescriptionLASVM
(MercerKernel<T> kernel, double C, double tol) Constructor.LASVM
(MercerKernel<T> kernel, double Cp, double Cn, double tol) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionTrains the model.
-
Constructor Details
-
LASVM
Constructor.- Parameters:
kernel
- the kernel.C
- the soft margin penalty parameter.tol
- the tolerance of convergence test.
-
LASVM
Constructor.- Parameters:
kernel
- the kernel.Cp
- the soft margin penalty parameter for positive instances.Cn
- the soft margin penalty parameter for negative instances.tol
- the tolerance of convergence test.
-
-
Method Details
-
fit
Trains the model.- Parameters:
x
- training samples.y
- training labels.epochs
- the number of epochs, usually 1 or 2 is sufficient.- Returns:
- the model.
-