data(Groceries)
dat <- as(Groceries, "binaryRatingMatrix")
rec <- Recommender(dat, method = "AR",
parameter=list(support = 0.0005, conf = 0.5, maxlen = 5))
pred <- predict(rec, newdata=c(1), data = dat, n=30)
as(pred, "list")
If the newdata argument in predict function is a list of index of users in the training data, newdata <- data[newdata,, drop=FALSE] will throw a warning drop not implemented for ratingMatrix!.
Minimum example code:
If the
newdata
argument inpredict
function is a list of index of users in the training data,newdata <- data[newdata,, drop=FALSE]
will throw a warningdrop not implemented for ratingMatrix!
.