Learn R Programming

recommenderlab (version 1.0.6)

Recommender: Create a Recommender Model

Description

Learns a recommender model from given data.

Usage

Recommender(data, ...)
# S4 method for ratingMatrix
Recommender(data, method, parameter=NULL)

Value

An object of class 'Recommender'.

Arguments

data

training data.

method

a character string defining the recommender method to use (see details).

parameter

parameters for the recommender algorithm.

...

further arguments.

Details

Recommender uses the registry mechanism from package registry to manage methods. This let's the user easily specify and add new methods. The registry is called recommenderRegistry. See examples section.

See Also

Recommender, ratingMatrix, predict.

Examples

Run this code
data("MSWeb")
MSWeb10 <- sample(MSWeb[rowCounts(MSWeb) >10,], 100)

rec <- Recommender(MSWeb10, method = "POPULAR")
rec

getModel(rec)

## save and read a recommender model
saveRDS(rec, file = "rec.rds")
rec2 <- readRDS("rec.rds")
rec2
unlink("rec.rds")

## look at registry and a few methods
recommenderRegistry$get_entry_names()

recommenderRegistry$get_entry("POPULAR", dataType = "binaryRatingMatrix")

recommenderRegistry$get_entry("SVD", dataType = "realRatingMatrix")

Run the code above in your browser using DataLab