Recommender {recommenderlab} | R Documentation |
Create a Recommender Model
Description
Learns a recommender model from given data.
Usage
Recommender(data, ...)
## S4 method for signature 'ratingMatrix'
Recommender(data, method, parameter=NULL)
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.
Value
An object of class 'Recommender'.
See Also
Recommender
,
ratingMatrix
,
predict
.
Examples
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")
[Package recommenderlab version 1.0.6 Index]