Class OCSVM<T>

java.lang.Object
smile.base.svm.OCSVM<T>
Type Parameters:
T - the data type of model input objects.

public class OCSVM<T> extends Object
One-class support vector machine.
  • Constructor Details

    • OCSVM

      public OCSVM(MercerKernel<T> kernel, double nu, double tol)
      Constructor.
      Parameters:
      kernel - the kernel function.
      nu - the parameter sets an upper bound on the fraction of outliers (training examples regarded out-of-class) and it is a lower bound on the number of training examples used as Support Vector.
      tol - the tolerance of convergence test.
  • Method Details

    • fit

      public KernelMachine<T> fit(T[] x)
      Fits a one-class support vector machine.
      Parameters:
      x - training instances.
      Returns:
      the model.