Evaluating a model consists of comparing the recommendations with the unknown purchases. We have used three functions in this recipe to split the dataset, evaluate the recommendation model, and measure the accuracy of the model.
The evaluationScheme function of the recommenderlab package is used to split the dataset into training and test sets and has the following parameters:
- data: This is the initial dataset.
- method: This is the way to split the data. In this case, it's split.
- train: This is the percentage of data in the training set.
- given: This is the number of items to keep.
- goodRating: This is the rating threshold.
- k: This is the number of times to run the evaluation.
The calcPredictionAccuracy function is used to ...