svmrfeFeatureRankingForMulticlass: SVM Recursive Feature Extraction (Multiclass)

Description Usage Arguments Value References See Also Examples

View source: R/svm.functions.R

Description

This conducts feature selection for Support Vector Machines models via recursive feature extraction. This returns a vector of the features in x ordered by relevance. The first item of the vector has the index of the feature which is more relevant to perform the classification and the last item of the vector has the feature which is less relevant. This function is specific to Binary classification problems.

Usage

1
svmrfeFeatureRankingForMulticlass(x, y, c, perc.rem = 10)

Arguments

x

A matrix where each column represents a feature and each row represents a sample

y

A vector of labels corresponding to each sample's group membership

c

A numeric value corresponding to the 'cost' applied during the svm model fitting. This can be selected by the user if using this function directly or is done internally.

perc.rem

A numeric value indicating the percent of features removed during each iteration. Default perc.rem = 10.

Value

Vector of features ranked from most important to least important.

References

Guyon I. et. al. (2010) Gene Selection for Cancer Classification using Support Vector Machines. Machine Learning 46 389-422.

See Also

svmrfeFeatureRanking

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
dat.discr <- create.discr.matrix(
    create.corr.matrix(
        create.random.matrix(nvar = 50, 
                             nsamp = 100, 
                             st.dev = 1, 
                             perturb = 0.2)),
    D = 10,
    num.groups=4
)

vars <- dat.discr$discr.mat
groups <- dat.discr$classes

# multiclass
svmrfeFeatureRankingForMulticlass(x = vars,
                                  y = groups, 
                                  c = 0.1,
                                  perc.rem = 10)

Example output

solo last variable [1] 11 44 26 43 10  8 22 17 32 28 38 18 14 27  7 35  4 37 41 30 45 12 48 16 25
[26]  5  6 31 34 46 40 15 50 29 19 36  1 23 21  9 39 42  3 33 24 20  2 13 47 49

OmicsMarkeR documentation built on April 28, 2020, 6:54 p.m.