问题
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