cvSubsets: cvSubsets

Description Usage Arguments Value Author(s) Examples

Description

To generate a list of subsets(indices of observations) from one set

Usage

1
cvSubsets(obj, fold)

Arguments

obj

a ExpressionSet, matrix or RangedSummarizedExperiment object. If it is a

matrix,columns represent samples

fold

the number of folds in cross validation.

Number of observations in the set does not need to be a multiple of fold

Value

returns the list of indices of subsets

Author(s)

Yuqing Zhang, Christoph Bernau, Levi Waldron

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
library(curatedOvarianData)


data(E.MTAB.386_eset)





id <- cvSubsets(E.MTAB.386_eset, 3)


subsets <- lapply(1:3, function(i){E.MTAB.386_eset[1:10, id[[i]]]})


sapply(subsets, dim)


rm(subsets)





## Number of observations in the set does not need to be a multiple of


## the fold parameter


id2 <- cvSubsets(E.MTAB.386_eset, 5)


subsets <- lapply(1:5, function(j){E.MTAB.386_eset[1:10, id2[[j]]]})


sapply(subsets, dim)


rm(subsets)

simulatorZ documentation built on Nov. 1, 2018, 2:25 a.m.