lpsvm {penalizedSVM}R Documentation

Fit L1-norm SVM

Description

SVM with variable selection (clone selection) using L1-norm penalty. ( a fast Newton algorithm NLPSVM from Fung and Mangasarian )

Usage

lpsvm(A, d, k = 5, nu = 0, output = 1, delta = 10^-3, epsi = 10^-4, 
seed = 123, maxIter=700)

Arguments

A

n-by-d data matrix to train (n chips/patients, d clones/genes).

d

vector of class labels -1 or 1's (for n chips/patiens ).

k

k-fold for cv, default k=5.

nu

weighted parameter, 1 - easy estimation, 0 - hard estimation, any other value - used as nu by the algorithm. Default : 0.

output

0 - no output, 1 - produce output, default is 0.

delta

some small value, default: 10^-3.

epsi

tuning parameter.

seed

seed.

maxIter

maximal iterations, default: 700.

Details

k: k-fold for cv, is a way to divide the data set into test and training set.
if k = 0: simply run the algorithm without any correctness calculation, this is the default.
if k = 1: run the algorithm and calculate correctness on the whole data set.
if k = any value less than the number of rows in the data set: divide up the data set into test and training using k-fold method.
if k = number of rows in the data set: use the 'leave one out' (loo) method

Value

a list of

w

coefficients of the hyperplane

b

intercept of the hyperplane

xind

the index of the selected features (genes) in the data matrix.

epsi

optimal tuning parameter epsilon

iter

number of iterations

k

k-fold for cv

trainCorr

for cv: average train correctness

testCorr

for cv: average test correctness

nu

weighted parameter

Note

Adapted from MATLAB code http://www.cs.wisc.edu/dmi/svm/lpsvm/

Author(s)

Natalia Becker

References

Fung, G. and Mangasarian, O. L. (2004). A feature selection newton method for support vector machine classification. Computational Optimization and Applications Journal 28(2) pp. 185-202.

See Also

sim.data

Examples

set.seed(123)
train<-sim.data(n = 20, ng = 100, nsg = 10, corr=FALSE, seed=12)
print(str(train)) 
	
# train data	
model <- lpsvm(A=t(train$x), d=train$y, k=5, nu=0,output=0, delta=10^-3, epsi=0.001, seed=12)
print(model)



[Package penalizedSVM version 1.1.4 Index]