ClassificationWrapper {MetabolomicsBasics}R Documentation

ClassificationWrapper.

Description

ClassificationWrapper will do classification using SVM's and/or Decision Trees including cross validation.

Usage

ClassificationWrapper(
  d = NULL,
  g = NULL,
  n = 100,
  n_rand = 1,
  k = 5,
  method = c("C50", "svm", "rpart", "ropls"),
  train = NULL,
  method.control = list(),
  silent = FALSE
)

Arguments

d

data, matrix or data.frame !! needs row/col-names.

g

Group-vector, factor.

n

replicates of classifications, i.e. number of different split into folds.

n_rand

different number of randomizations, see Details.

k

Fold cross validation.

method

Currently svm, ropls and decision tree methods (C50 and rpart) are supported.

train

Either NULL (random permutations) or an index vector for a training subset out of g.

method.control

A list of parameters, forwarded to the selected methods function.

silent

Logical. Set TRUE to suppress progress bar and warnings.

Details

Parameter 'n_rand' will influence how permutation testing for robustness is conducted. If n_rand=1 than samples will be permuted exactly one time and subjected to n replications (with respect to fold splitting). If n_rand>1, samples will be permuted this many times but number of replications will be lowered to limit processing time. A good compromise is to balance both, using less replications than for observed data but on several randomizations.

Value

#' Classification results as list.

Examples

raw <- MetabolomicsBasics::raw
sam <- MetabolomicsBasics::sam
gr <- sam$Origin
# establish a basic rpart model and render a fancy plot including the accuracy

class_res <- ClassificationWrapper(d = raw, g = gr, method = c("rpart", "svm"), n = 3, k = 3)
ClassificationHistogram(class_res)


[Package MetabolomicsBasics version 1.4.5 Index]