BiocParallel
.
"runTests"(expression, classes, ...) "runTests"(expression, datasetName, classificationName, validation = c("bootstrap", "leaveOut"), bootMode = c("fold", "split"), resamples = 100, percent = 25, folds = 5, leave = 2, seed, parallelParams = bpparam(), params = list(SelectionParams(), TrainParams(), PredictParams()), verbose = 1)
matrix
or ExpressionSet
containing
the training data. For a matrix, the rows are features, and the columns
are samples.MulticoreParam
or SnowParam
.list
of objects of class of TransformParams
,
SelectionParams
, TrainParams
, or PredictParams
.
The order they are in the list determines the order in which the stages
of classification are done in.matrix
method passed to the
ExpressionSet
method.ClassifyResult
. If the predictor function made a set of predictions, then
a list of such objects.
if(require(curatedOvarianData) && require(sparsediscrim))
{
data(TCGA_eset)
badOutcome <- which(pData(TCGA_eset)[, "vital_status"] == "deceased" & pData(TCGA_eset)[, "days_to_death"] <= 365)
goodOutcome <- which(pData(TCGA_eset)[, "vital_status"] == "living" & pData(TCGA_eset)[, "days_to_death"] >= 365 * 5)
TCGA_eset <- TCGA_eset[, c(badOutcome, goodOutcome)]
classes <- factor(rep(c("Poor", "Good"), c(length(badOutcome), length(goodOutcome))))
pData(TCGA_eset)[, "class"] <- classes
runTests(TCGA_eset, "Ovarian Cancer", "Differential Expression", resamples = 2, fold = 2)
}
Run the code above in your browser using DataLab