mhahsler / recommenderlab

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

UBCF counts the active user as a part of neighborhood #36

Closed aliko-str closed 5 years ago

aliko-str commented 5 years ago

When newdata are the same as training data (i.e., we want to fill in missing ratings in the original training user-item matrix), UBCF (maybe IBCF, I didn't check it) counts the active user as a part of their neighborhood. The code then generates new estimates for the ratings that we already have (i.e., for the ratings of the active user that were in the training matrix) - I'd expect the original ratings to be copied into the output matrix (instead of being generated based on the neighborhood).

mhahsler commented 5 years ago

This is a problem for UBCF since it stores all the data. I have fixed to code so it will not use the data for the active user.