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

ⅰ亾dé卋堺 提交于 2019-12-18 16:56:29

问题


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


回答1:


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.


来源:https://stackoverflow.com/questions/36723429/how-can-i-handle-new-users-items-in-model-generated-by-spark-als-from-mllib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!