do.stratified.cv.data.from.folds: Construction of folds for cross-validation from predefined folds
Description
The function generates data for cross-validation from pre-computed folds
Usage
do.stratified.cv.data.from.folds(examples, positives, folds, k = 10)
Arguments
examples
vector of integer: indices of the examples
positives
vector of integer: Indices of the positive examples. The indices refer to the indices of examples
folds
vector of indices : its length is equal to examples, with values in the interval \([0,kk)\). The value indicates the partition in the cross validation step of the class
k
number of folds (def = 10)
Value
a list with two components;
fold.non.positives
a list with k components. Each component is a vector with the indices of the non positive elements of the fold
old.positives
a list with k components. Each component is a vector with the indices of the positive elements of the fold
Details
The folds are separated for positive and negative examples. The elements included in each fold are obtained from the vector of fold indices folds.