mhahsler / recommenderlab

recommenderlab - Lab for Developing and Testing Recommender Algorithms - R package
213 stars 61 forks source link

"drop not implemented for ratingMatrix!" warning in Predict #20

Closed donnydongchen closed 6 years ago

donnydongchen commented 6 years ago

Minimum example code:

 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!.

mhahsler commented 6 years ago

Thank you. It is a benign warning message that will disappear in the next release.