svm.bin: Fitting Binary Support Vector Machine

Description Usage Arguments Value

View source: R/svm.bin.R

Description

Implementation of the MM algorithm solver for the binary support vector machine.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
svm.bin(
  formula,
  data,
  lambda,
  loss = "qua",
  huber.k = NULL,
  loss.tol = 1e-06,
  v.init = NULL,
  seed = NULL,
  verbose = 0
)

Arguments

formula

an object of class formula: a symbolic description of the model to be fitted following the standard of lm.

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment (formula), typically the environment from which this function is called.

lambda

penalty term scaling hyperparameter.

loss

hinge loss to use in estimation. Default is 'qua', that is, quadratic hinge loss.

huber.k

hyperparameter for Huber hinge errors. Default is NULL.

loss.tol

optional convergence tolerance in the MM algorithm. Default is 1e-6.

v.init

optional initial v parameters to use in the MM algorithm. Default is NULL.

seed

optional seed. Default is NULL.

verbose

optional number indicating per how many iterations the estimation progress is displayed. Default is 0, that is, no progress updates.

Value

svm.bin returns an object of class mlkit.bin.fit. An object of class mlkit.bin.fit is a list containing at least the following components:

coefficients

a named vector of optimal coefficients.

loss

SVM loss including penalizing term on the parameters.


Accelerytics/mlkit documentation built on Dec. 31, 2020, 9:46 a.m.