Description Usage Arguments Examples
The function creates two matrices and returns them as members of a list. 'train' holds training sample indices, columns are cv-folds and rows are sample indices to hold as training samples in each fold. 'test' holds test/validation sample indices, columns are cv-folds and rows are sample indices to hold as test samples in each fold
1 2 |
x |
The original data matrix or data.frame |
fold |
Number of desired cross-validation folds; preferably between 3 (3-fold CV) and nrow(x) (LOO-CV) |
strata |
Indicator if some strata should be balanced over the bins; if no balancing is required, the vector should consist of a single value with length equal to rows in x. Otherwise each strata/batch should be indicated as a unique member in the vector. |
shuffle |
Whether the indices for the data matrix should be shuffled prior to assigning them to train/test bins |
seed |
A random seed for reproducibility |
1 2 3 4 |
Attaching package: ‘ePCR’
The following object is masked from ‘package:graphics’:
plot
The following object is masked from ‘package:base’:
plot
[[1]]
[1] 7 15 19 22 24 35 36 41 42 44 48 50 55 56 58 59 62 67
[19] 70 71 74 77 84 85 92 93 94 96 100 102 107 108 109 111 114 117
[37] 123 124 125 131 134 135 137 139 140 141 143 144 147 148 2 3 4 8
[55] 9 10 11 12 16 17 21 25 26 27 28 31 32 34 37 38 39 40
[73] 43 47 49 52 53 54 61 65 69 72 75 78 81 82 86 87 88 99
[91] 113 115 119 120 121 122 127 136 142 146
[[2]]
[1] 1 5 6 13 14 18 20 23 29 30 33 45 46 51 57 60 63 64
[19] 66 68 73 76 79 80 83 89 90 91 95 97 98 101 103 104 105 106
[37] 110 112 116 118 126 128 129 130 132 133 138 145 149 150 2 3 4 8
[55] 9 10 11 12 16 17 21 25 26 27 28 31 32 34 37 38 39 40
[73] 43 47 49 52 53 54 61 65 69 72 75 78 81 82 86 87 88 99
[91] 113 115 119 120 121 122 127 136 142 146
[[3]]
[1] 1 5 6 13 14 18 20 23 29 30 33 45 46 51 57 60 63 64
[19] 66 68 73 76 79 80 83 89 90 91 95 97 98 101 103 104 105 106
[37] 110 112 116 118 126 128 129 130 132 133 138 145 149 150 7 15 19 22
[55] 24 35 36 41 42 44 48 50 55 56 58 59 62 67 70 71 74 77
[73] 84 85 92 93 94 96 100 102 107 108 109 111 114 117 123 124 125 131
[91] 134 135 137 139 140 141 143 144 147 148
[[1]]
[1] 1 5 6 13 14 18 20 23 29 30 33 45 46 51 57 60 63 64 66
[20] 68 73 76 79 80 83 89 90 91 95 97 98 101 103 104 105 106 110 112
[39] 116 118 126 128 129 130 132 133 138 145 149 150
[[2]]
[1] 7 15 19 22 24 35 36 41 42 44 48 50 55 56 58 59 62 67 70
[20] 71 74 77 84 85 92 93 94 96 100 102 107 108 109 111 114 117 123 124
[39] 125 131 134 135 137 139 140 141 143 144 147 148
[[3]]
[1] 2 3 4 8 9 10 11 12 16 17 21 25 26 27 28 31 32 34 37
[20] 38 39 40 43 47 49 52 53 54 61 65 69 72 75 78 81 82 86 87
[39] 88 99 113 115 119 120 121 122 127 136 142 146
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.