Class BinarySparseLinearSVM

java.lang.Object
smile.regression.BinarySparseLinearSVM
All Implemented Interfaces:
Serializable, ToDoubleFunction<int[]>, Regression<int[]>

public class BinarySparseLinearSVM extends Object implements Regression<int[]>
Binary sparse linear support vector machines for regression.
See Also:
  • Constructor Details

    • BinarySparseLinearSVM

      public BinarySparseLinearSVM(int p, KernelMachine<int[]> svm)
      Constructor.
      Parameters:
      p - the dimension of input vector.
      svm - The kernel machine.
  • Method Details

    • weights

      public double[] weights()
      Returns the linear weights.
      Returns:
      the linear weights.
    • intercept

      public double intercept()
      Returns the intercept.
      Returns:
      the intercept.
    • predict

      public double predict(int[] x)
      Description copied from interface: Regression
      Predicts the dependent variable of an instance.
      Specified by:
      predict in interface Regression<int[]>
      Parameters:
      x - an instance.
      Returns:
      the predicted value of dependent variable.