crossval: Performs cross-validation with a specified algorithm

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/CrossValidation.R

Description

Performs a cross-validation using the specified algorithms. If package parallel is loaded the cross-validation will be performed in parallel. If the parallel package is loaded but a parallel cross-validation is not wanted parallel can be set to FALSE. If parallel cross-validation is desired the number of cores can be choosen by using the cores parameter.

Usage

1
2
  crossval(x, y, theta.fit, folds = 10, repeats = 1,
    parallel = TRUE, cores = NULL, DEBUG = FALSE, ...)

Arguments

x

a p x n matrix of expression measurements with p samples and n genes.

y

a factor of length p comprising the class labels.

theta.fit

the method to learn a decision boundary. Currently available are fit.rrfe, fit.rfe, fit.graph.svm, fit.networkBasedSVM

folds

number of folds to perform

repeats

number of how often to repeat the x-fold cross-validation

parallel

should the cross-validation be performed in parallel i.e. on several cpu-cores. (see also Details section)

cores

specify the number of cores that should be used for parallel cross-validation.

DEBUG

should debugging information be plotted. Defaults to n - 1 cores.

...

additional parameters to theta fit.

Value

a list with the results of the cross-validation. See details for more information.

Note

Parallel cross-validation can only be performed if the parallel-package was loaded prior to calling this function.

Author(s)

Marc Johannes JohannesMarc@gmail.com

See Also

fit.rrfe, fit.rfe, fit.graph.svm, fit.networkBasedSVM

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
set.seed(4321)
data(example_data)
res.rfe  <- crossval(x, y, DEBUG=TRUE, theta.fit=fit.rfe, folds=2, repeats=1, parallel=TRUE,
 Cs=10^(-3:3))
res.rrfe <- crossval(x, y, DEBUG=TRUE, theta.fit=fit.rrfe, folds=3, repeats=1, parallel=TRUE, 
Cs=10^(-3:3), mapping=mapping, Gsub=adjacency.matrix, d=1/2)

## End(Not run)

pathClass documentation built on May 29, 2017, 11:44 p.m.