perm.features: Feature Selection via Monte Carlo Permutation

Description Usage Arguments Value Author(s) References Examples

View source: R/perm.features.R

Description

Applies Monte Carlo permutations to user specified models. The user can either use the results from fs.stability or provide specified model parameters.

Usage

1
2
perm.features(fs.model = NULL, X, Y, method, sig.level = 0.05, nperm = 10,
  allowParallel = FALSE, verbose = TRUE, ...)

Arguments

fs.model

Object containing results from fs.stability

X

A scaled matrix or dataframe containing numeric values of each feature

Y

A factor vector containing group membership of samples

method

A vector listing models to be fit. Available options are "plsda" (Partial Least Squares Discriminant Analysis), "rf" (Random Forest), "gbm" (Gradient Boosting Machine), "svm" (Support Vector Machines), "glmnet" (Elastic-net Generalized Linear Model), and "pam" (Prediction Analysis of Microarrays)

sig.level

Desired significance level for features, default sig.level = .05

nperm

Number of permutations, default nperm = 10

allowParallel

Logical argument dictating if parallel processing is allowed via foreach package. Default allowParallel = FALSE

verbose

Logical argument whether output printed automatically in 'pretty' format.

...

Extra arguments that the user would like to apply to the models

Value

sig.level

User-specified significance level

num.sig.features

Number of significant features

sig.features

Dataframe of significant features

Author(s)

Charles Determan Jr.

References

Wongravee K., et. al. (2009) Monte-Carlo methods for determining optimal number of significant variables. Application to mouse urinary profiles. Metabolomics 5:387-406.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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

fits <- fs.stability(vars, 
                     groups, 
                     method = c("plsda", "rf"), 
                     f = 10, 
                     k = 3, 
                     k.folds = 10, 
                     verbose = 'none')

# permute variables/features
perm.features(fits, vars, groups, "rf",
              sig.level = .05, nperm = 10)

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