# NOT RUN {
x <- matrix(sample(c(0:5), size = 200, replace = TRUE,
prob = c(.6,.08,.08,.08,.08,.08)), nrow = 20, byrow = TRUE)
x <- defineData(x)
my_10_folds <- evalModel(x, 10) #output class evalModel.
my_6_folds <- evalModel(x, 6)
my_6_folds
#6 - fold cross validation model on the dataset with 20 users and 10 items.
my_6_folds@data #the dataset.
my_6_folds@folds #the number of folds in the model.
my_6_folds@fold_indices #the index of each item in the fold.
# }
Run the code above in your browser using DataLab