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

recommend

Generate recommendation.


Description

This method generates top-n recommendations based on a model that has been trained before. Two main methods: recommendHPR, recommendMF. The first method recommends the highest predicted ratings on a user. Instead recommendMF (currently available only for IBKNN and UBKNN), recommends the most frequent item in the user's neighborhood.

Usage

recommendHPR(model, topN = 3)
recommendMF(model, topN = 3, pt)

Arguments

model

the trained model of any algorithm.

topN

number of items to be recommended per user, class numeric.

pt

positive threshold, class numeric.

Value

Returns a list with suggested items for each user.

See Also

Examples

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

myratings <- defineData(myratings)

r <- rrecsys(myratings, alg = "FunkSVD", k = 2)

rec <- recommendHPR(r)

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.