# negative output of matrix factorization on user-item rating matrix

Given a user-item rating matrix $R$, matrix factorization are usually used to learn latent factors for user $U$ and items $V$.

However, no matter how we train the model (SGD or ALS) and how we regularize the parameters, we still might get negative predicted ratings, right?

How do we solve this issue other than resorting to non-negative matrix factorization (NMF)?

• You typically (i think every relevant paper does that) normalize your user-item matrix so that is has mean zero. Of course it's also possible, that your predictions fall out of range (e.g. 1-5 -> pred 6). I would just trim these values. Jul 31 '16 at 14:12
• @sascha, so we should trim the predictions if they fall out of range? Is this what people do in industry? Jul 31 '16 at 22:43
• Well i don't know what's happening in industry. But if ratings are in range 1-5, it makes no sense to return a predicted 6 (the same if you are in a ML-competition; the knowledge is a-priori information which is hard to incorporate into a model of constrained complexity; of course one could introduce some special loss-function...). And depending on the noise of the data, i would expect, that there are always some predictions out of range if using matrix-factorization techniques. You should check out some netflix competition tutorials/papers. The work during this competition made a big impact. Jul 31 '16 at 22:47
• @sascha, thanks, I've read some papers on mf, as well as their application on some tasks similar to netflix competition, but looks like, no one mentions how to deal with out-range predictions. Jul 31 '16 at 23:04

The common way to deal with this issue is to clip the predictions to within the range of possible ratings. It doesn't have an impact on the results because utimately you would be showing the top $k$ products with the highest predicted ratings, to the user. Ideally you wouldn't encounter a situation where the negative ratings (after clipping) are in fact the highest and so you may not even care about clipping them in a practical setting.