pegasos: pegasos

Description Usage Arguments Details Value Author(s) References Examples

Description

If intercept=TRUE, the data is not literally modified to include a column of ones. However, this is conceptually what we do.

Usage

1
pegasos(x, y, intercept = TRUE, k = 5, lambda = 0.1, niter = 1e+05)

Arguments

x

The features matrix.

y

The 2-class response vector. Note that the groups must be +/- 1. See recode()

intercept

Should the model include an intercept term?

k

TODO, currently ignored

lambda

Regularization parameter.

niter

The number of iterations.

Details

Pegasos SVM solver.

Value

An object of class pegasosSVM.

Author(s)

Drew Schmidt

References

Shalev-Shwartz, Shai, et al. "Pegasos: Primal estimated sub-gradient solver for svm." Mathematical programming 127.1 (2011): 3-30.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(ssvm)

y <- recode(iris$Species == "setosa")
x <- as.matrix(iris[, -5])

pegasos(x, y)

## End(Not run)

wrathematics/ssvm documentation built on May 4, 2019, 10:54 a.m.