Advantages of matrix factorization when the number of products is low

I'm building a recommender system where the number of products is rather low (around 50), and we can assume it'll stay the same for a long time.

I'm looking at two different way of tackling the problem:

  • Using a matrix factorization technique.
  • Treating it as a multi-class classification problem with a target of 50 different possible values. The features I'm using are the ones that the matrix factorization technique uses implicitly:
    • Number of times a user has bought product 1.
    • Number of times a user has bought product 2.
    • ...
    • Number of times a user has bought product 50.

In addition, I'm also able to add user features for the classification approach, like age, gender, and localization, among others.

Is there any reason/advantages to using the matrix factorization technique in this case? What are the advantages/disadvantages of both methods?

Topic matrix-factorisation classification recommender-system machine-learning

Category Data Science


Disadvantage of the matrix factorization

  1. how to encode the feature ? should it be binary (present and absent) or rather integer (for example summing up number of signals user have interacted with item_i)
  2. unfortunately you can't integrate meta data on your matrix factorization, neither on the item nor on the user
  3. the cold start - you don't know how to offer new items or what to offer to new users. So you would have to setup up a bandit model in addition

on the other hand,

  1. easy to deploy and easily scalable
  2. you wont have much challenges when it comes to feature engineering

challenges for the multi-class classification:

  1. taking care of time in training/evaluating the model: feature engineering is a bit tougher (this is also the case for matrix factorization) but here you also have to make sure, your feature engineering is respecting the time. For example, if you have a feature how many times user_i has purchased item_j, you have to make sure the test labels (buying item j) is not already encoded in the feature set (if you say the user already has purchased item or preferred that price) - otherwise there would be a huge data leak in your model.

  2. perhaps in your data you will have rows belong to a single user who has purchased multiple items - so you have to take care of these mixed effects. otherwise you have to somehow make sure your model learns about each individual user (if you want to have an individual-level high-precision recommender)! imagine a user has purchased 25 items before. then you have 25 rows, right ?

  3. deployment is gonna be a bit harder as you have to do feature engineering also for upcoming data. hopefully you won't have issue with memory usage but these are serious side effects of models that need feature engineering.


You should try both approaches, see what works best for your business objective and possibly serve up a hybrid recommendation using outputs from both models.

You should also look at models that take advantage of user or item similarity information to suggest products to users.

One disadvantage of the matrix factorization technique is that they suffer from the cold start problem in not being able to serve a recommendation for new users that have bought nothing. That is where an approach of using user demographics such as age, gender etc to serve up recommendations based on what similar users have purchased in the past helps.

Also, no matter what technique you choose, make sure to retrain the models periodically giving higher weightage to recent activity of your user base to keep track of latest usage trends.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.