do.stratified.cv.data.from.folds: Construction of folds for cross-validation from predefined...

Description Usage Arguments Details Value See Also Examples

View source: R/hyperSMURF2.0.R

Description

The function generates data for cross-validation from pre-computed folds

Usage

1
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)

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.

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

See Also

do.stratified.cv.data

Examples

1
do.stratified.cv.data.from.folds(1:100, 1:10, folds=sample(rep((0:4),20)), k = 5)

hyperSMURF documentation built on April 30, 2018, 1:04 a.m.