public class LASVM<T>
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
LASVM(smile.math.kernel.MercerKernel<T> kernel,
double C,
double tol)
Constructor.
|
LASVM(smile.math.kernel.MercerKernel<T> kernel,
double Cp,
double Cn,
double tol)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
KernelMachine<T> |
fit(T[] x,
int[] y)
Trains the model.
|
KernelMachine<T> |
fit(T[] x,
int[] y,
int epoch)
Trains the model.
|
public LASVM(smile.math.kernel.MercerKernel<T> kernel, double C, double tol)
C
- the soft margin penalty parameter.tol
- the tolerance of convergence test.public LASVM(smile.math.kernel.MercerKernel<T> kernel, double Cp, double Cn, double tol)
Cp
- the soft margin penalty parameter for positive instances.Cn
- the soft margin penalty parameter for negative instances.tol
- the tolerance of convergence test.public KernelMachine<T> fit(T[] x, int[] y)
x
- training samples.y
- training labels.public KernelMachine<T> fit(T[] x, int[] y, int epoch)
x
- training samples.y
- training labels.epoch
- the number of epochs, usually 1 or 2 is sufficient.