# svm.1norm: Fit L1-norm SVM In penalizedSVM: Feature Selection SVM using penalty functions

## Description

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

## Usage

 ```1 2``` ```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

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.

`sim.data`
 ```1 2 3 4 5 6 7 8``` ```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) print.1norm.svm(model) ```