Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

evalModel

Creating the evaluation model.


Description

Creates the dataset split for evaluation where ratings of each user are uniformly distributed over k random folds. The function returns the list of items that are assigned to each fold, such that algorithms can be compared on the same train/test splits.

Usage

evalModel(data, folds)

Arguments

data

dataset, of class _ds.

folds

The number of folds to use in the k-fold cross validation, of class numeric, default value set to 5.

Value

An object of class evalModel-class.

See Also

Examples

x <- matrix(sample(c(0:5), size = 200, replace = TRUE, 
     prob = c(.6,.08,.08,.08,.08,.08)), nrow = 20, byrow = TRUE)

d <- defineData(x)
     
my_2_folds <- evalModel(d, 2)             #output class evalModel.

my_2_folds
# 2 - fold cross validation model on the dataset with 20 users and 10 items.

my_2_folds@data                     #the dataset.
my_2_folds@folds                    #the number of folds in the model.
my_2_folds@fold_indices               #the index of each item in the fold.

rrecsys

Environment for Evaluating Recommender Systems

v0.9.7.3.1
GPL-3
Authors
Ludovik Çoba [aut, cre, cph], Markus Zanker [ctb], Panagiotis Symeonidis [ctb]
Initial release
2018-02-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.