I'm building a collaborative filter using matrix factorization and alternating least squares. For some reason, the math always give me back the same recommendations for all my test users (not always identical, but very similar for each person: only a few different products each time).

The input is not discrete and is of the form:

PersonID, ProductID, numberOfTimesPurchased

I know that collaborative filtering typically uses a rating as input, but I wanted to test with a simple count. I have read this is called an "implied rating".

Do you have any suggestions about changing the input data or adjusting the hyperparameters in order to get a more diverse recommendation pool?


The count mesure is called an implicit feedback.

You need to use algorithms that are tailored for this kind of data.

The paper Collaborative Filtering for Implicit Feedback Datasets (2009 - by Yifan Hu, Yehuda Koren and Chris Volinsky), that performs matrix factorization with ALS, deals with this kind of data.

It has been implemented here in python https://github.com/benfred/implicit

Concerning the fact that your algorithm always returns the same recommendation, you should look at your data distribution, which may be unequal (short head, long tail problem).

  • $\begingroup$ Could you add a full citation/reference for the paper (authors, date, publisher etc) as you would in an academic work? This will make it easier to find $\endgroup$ – Silverfish Sep 7 '16 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.