Class SVM

java.lang.Object
smile.regression.SVM

public class SVM extends Object
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

  1. A. J Smola and B. Scholkopf. A Tutorial on Support Vector Regression.
  2. Gary William Flake and Steve Lawrence. Efficient SVM Regression Training with SMO.
  3. Christopher J. C. Burges. A Tutorial on Support Vector Machines for Pattern Recognition. Data Mining and Knowledge Discovery 2:121-167, 1998.
  4. John Platt. Sequential Minimal Optimization: A Fast Algorithm for Training Support Vector Machines.
  5. 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.
  6. 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.
  7. Tobias Glasmachers and Christian Igel. Second Order SMO Improves SVM Online and Active Learning.
  8. Chih-Chung Chang and Chih-Jen Lin. LIBSVM: a Library for Support Vector Machines.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SVM()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SVM

      public SVM()
  • Method Details

    • fit

      public static Regression<double[]> fit(double[][] x, double[] y, double eps, double C, double tol)
      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

      public 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.
      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

      public static Regression<double[]> fit(double[][] x, double[] y, Properties params)
      Fits an epsilon-SVR.
      Parameters:
      x - training samples.
      y - response variable.
      params - the hyper-parameters.
      Returns:
      the model.