plNested: Nested Cross-Validation

Description Usage Arguments Details Value Examples

Description

Perform nested cross-validation.

Usage

1
plNested(array, fold = 10, ctrlFS = NULL, ctrlGS, save = FALSE)

Arguments

array

Specifies the ExprsArray object to undergo cross-validation.

fold

A numeric scalar. Specifies the number of folds for cross-validation. Set fold = 0 to perform leave-one-out cross-validation.

ctrlFS

A list of arguments handled by ctrlFeatureSelect.

ctrlGS

Arguments handled by ctrlGridSearch.

save

A logical scalar. Toggles whether to save each fold.

Details

Analogous to how plGrid manages multiple build and predict tasks, one can think of plNested as managing multiple pl tasks.

Specifically, plNested segregates the data into v-folds, treating each fold as a validation set and the subjects not in that fold as a training set. Then, some fold times, it performs all feature selection tasks (listed via ctrlFS) on each split of the data, and executes the pl function (via ctrlGS) using the training set.

To perform multiple feature selection tasks, supply a list of multiple ctrlFeatureSelect argument wrappers to ctrlFS. To reduce the results of plNested to a single performance metric, you can feed the returned ExprsPipeline object through the helper function calcNested.

When calculating model performance with calcStats, this function forces aucSkip = TRUE and plotSkip = TRUE. When embedding another plMonteCarlo or plNested call within this function (i.e., via ctrlGS), outer-fold model performance will force aucSkip = TRUE and plotSkip = TRUE.

Value

An ExprsPipeline-class object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
require(golubEsets)
data(Golub_Merge)
array <- arrayEset(Golub_Merge, colBy = "ALL.AML", include = list("ALL", "AML"))
array <- modFilter(array, 20, 16000, 500, 5) # pre-filter Golub ala Deb 2003
array <- modTransform(array) # lg transform
array <- modNormalize(array, c(1, 2)) # normalize gene and subject vectors
fs <- ctrlFeatureSelect(func = "fsEbayes", top = 0)
gs <- ctrlGridSearch(func = "plGrid", how = "buildANN", top = c(10, 20, 30),
                     size = 1:3, decay = c(0, .5, 1), fold = 0)
nest <- plNested(arrays[[1]], fold = 10, ctrlFS = fs, ctrlGS = gs, save = FALSE)

## End(Not run)

exprso documentation built on May 1, 2019, 7:11 p.m.