Package smile.regression
Class SVM
java.lang.Object
smile.regression.SVM
Epsilon support vector regression. Like SVMs for classification, the model
produced by SVR depends only on a subset of the training data, because
the cost function ignores any training data close to the model prediction
(within a threshold ε).
References
- A. J Smola and B. Scholkopf. A Tutorial on Support Vector Regression.
- Gary William Flake and Steve Lawrence. Efficient SVM Regression Training with SMO.
- Christopher J. C. Burges. A Tutorial on Support Vector Machines for Pattern Recognition. Data Mining and Knowledge Discovery 2:121-167, 1998.
- John Platt. Sequential Minimal Optimization: A Fast Algorithm for Training Support Vector Machines.
- Rong-En Fan, Pai-Hsuen, and Chih-Jen Lin. Working Set Selection Using Second Order Information for Training Support Vector Machines. JMLR, 6:1889-1918, 2005.
- Antoine Bordes, Seyda Ertekin, Jason Weston and Leon Bottou. Fast Kernel Classifiers with Online and Active Learning, Journal of Machine Learning Research, 6:1579-1619, 2005.
- Tobias Glasmachers and Christian Igel. Second Order SMO Improves SVM Online and Active Learning.
- Chih-Chung Chang and Chih-Jen Lin. LIBSVM: a Library for Support Vector Machines.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Regression
<double[]> fit
(double[][] x, double[] y, double eps, double C, double tol) Fits a linear epsilon-SVR.static Regression
<double[]> fit
(double[][] x, double[] y, Properties params) Fits an epsilon-SVR.static Regression
<int[]> fit
(int[][] x, double[] y, int p, double eps, double C, double tol) Fits a linear epsilon-SVR of binary sparse data.static Regression
<SparseArray> fit
(SparseArray[] x, double[] y, int p, double eps, double C, double tol) Fits a linear epsilon-SVR of sparse data.static <T> KernelMachine
<T> fit
(T[] x, double[] y, MercerKernel<T> kernel, double eps, double C, double tol) Fits an epsilon-SVR.
-
Constructor Details
-
SVM
public SVM()
-
-
Method Details
-
fit
Fits a linear epsilon-SVR.- Parameters:
x
- training samples.y
- response variable.eps
- the parameter of epsilon-insensitive hinge loss. There is no penalty associated with samples which are predicted within distance epsilon from the actual value. Decreasing epsilon forces closer fitting to the calibration/training data.C
- the soft margin penalty parameter.tol
- the tolerance of convergence test.- Returns:
- the model.
-
fit
Fits a linear epsilon-SVR of binary sparse data.- Parameters:
x
- training samples.y
- response variable.p
- the dimension of input vector.eps
- the parameter of epsilon-insensitive hinge loss. There is no penalty associated with samples which are predicted within distance epsilon from the actual value. Decreasing epsilon forces closer fitting to the calibration/training data.C
- the soft margin penalty parameter.tol
- the tolerance of convergence test.- Returns:
- the model.
-
fit
public static Regression<SparseArray> fit(SparseArray[] x, double[] y, int p, double eps, double C, double tol) Fits a linear epsilon-SVR of sparse data.- Parameters:
x
- training samples.y
- response variable.p
- the dimension of input vector.eps
- the parameter of epsilon-insensitive hinge loss. There is no penalty associated with samples which are predicted within distance epsilon from the actual value. Decreasing epsilon forces closer fitting to the calibration/training data.C
- the soft margin penalty parameter.tol
- the tolerance of convergence test.- Returns:
- the model.
-
fit
public static <T> KernelMachine<T> fit(T[] x, double[] y, MercerKernel<T> kernel, double eps, double C, double tol) Fits an epsilon-SVR.- Type Parameters:
T
- the data type of samples.- Parameters:
x
- training samples.y
- response variable.kernel
- the kernel function.eps
- the parameter of epsilon-insensitive hinge loss. There is no penalty associated with samples which are predicted within distance epsilon from the actual value. Decreasing epsilon forces closer fitting to the calibration/training data.C
- the soft margin penalty parameter.tol
- the tolerance of convergence test.- Returns:
- the model.
-
fit
Fits an epsilon-SVR.- Parameters:
x
- training samples.y
- response variable.params
- the hyper-parameters.- Returns:
- the model.
-