Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I handle new users/items in model generated by Spark ALS from MLlib?

currently when a new user comes I cannot update my recommender system which apprently is related to not having added the user and item matrix. Where can I find this and how to do this? Thanks

model.userFactors model.itemFactors

like image 214
peter Avatar asked Apr 19 '16 15:04

peter


1 Answers

When items features and users features are computed the model is prepared only to recommend for known items and users. If You have new user/item, You have to cope with cold start problem.

But there are two things - making recommendations work for new users/items and the separate thing is updating the model (features matrices) near-online.

In order to prepare recommendations for new/anonymous user, which wasn't in input data when model was build, You have to prepare it's features vector. The method is to prepare it from features of items already seen (or any kind of interaction You are considering as 'like'), e.g. calculate mean value for every feature from those items which user liked. Or look at Oryx code for the method of building anonymous user feature vector

For updating Your model near-online (I write near, because face it, the true online update is impossible) by using fold-in technique, e.g.: Online-Updating Regularized Kernel Matrix Factorization Models for Large-Scale Recommender Systems. Ou You can look at code of:

  • MyMediaLite
  • Oryx - framework build with Lambda Architecture paradigm. And it should have updates with fold-in of new users/items.
like image 138
Bartłomiej Twardowski Avatar answered Oct 08 '22 19:10

Bartłomiej Twardowski