Learn R Programming

OmicsMarkeR (version 1.4.2)

svmrfeFeatureRanking: SVM Recursive Feature Extraction (Binary)

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

svmrfeFeatureRanking(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

svmrfeFeatureRankingForMulticlass

Examples

Run this code
dat.discr <- create.discr.matrix(
    create.corr.matrix(
        create.random.matrix(nvar = 50, 
                             nsamp = 100, 
                             st.dev = 1, 
                             perturb = 0.2)),
    D = 10
)

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

# binary class feature ranking
svmrfeFeatureRanking(x = vars,
                     y = groups, 
                     c = 0.1,
                     perc.rem = 10)

Run the code above in your browser using DataLab