Description
Create the folds given the features matrix
Usage
CreateFolds(features, num_folds)
Arguments
features
is the features matrix that has to be divided in folds for performing cross validation
num_folds
number of folds desired
Value
folds: the elements divided in folds
Examples
r <- 8
c <- 10
m0 <- matrix(0, r, c)
features<-apply(m0, c(1,2), function(x) sample(c(0,1),1))
folds<-CreateFolds(features,4)