Learn R Programming

pathClass (version 0.5)

crossval: Performs cross-validation with a specified algorithm...

Description

Performs cross-validation with a specified algorithm

Usage

crossval(x, y, theta.fit, folds=10, repeats=1, parallel=TRUE, cores,
    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,
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.

Details

Performs a cross-validation using the specified algorithms. If package multicore is loaded the cross-validation will be performed in parallel. If the multicore 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.

See Also

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

Examples

Run this code
library(Biobase)
data(sample.ExpressionSet)
x <- t(exprs(sample.ExpressionSet))
y <- factor(pData(sample.ExpressionSet)$sex)
res.rfe <- crossval(x,y,DEBUG=TRUE,theta.fit=fit.rfe,folds=2,repeats=1,parallel=TRUE,Cs=10^(-3:3))

Run the code above in your browser using DataLab