Prediction with multiple features (attributes) I recently used a prediction algorithm to try to predict how much an user is willing to interact with an item using ALS (Matrix Factorisation) but I had to "condense" multiple attributes into one, deciding some arbitrary weights for the values to be able to calculate the rating to use.

It works (sort of) but I think it is definitely wrong because weighting the attributes manually is static and do not adapt to the data themselves dynamically.

I was thinking to switch to a Distributed Random Forest algorithm but even if it would use all the attributes (randomly) they would not be used all together and this makes it not fit for my purposes.

During my researches I found out that the Recurrent neural networks may be fit for what I am trying to achieve but before focusing on them, because I am not really an expert in the field, I would like to have suggestions :)

Potentially I could take advantage of the time-series feature of the RNNs but for now I prefer to focus on supporting the set of attributes I have.

Currently the "rating" for the ALS is calculated weighting some attributes like:


how many times the user viewed the item page
how many times the user viewed the category page
how many times the user viewed the sub category page
how many times the user bought something from the category
how many times the user bought something from the sub category
how much time ago the user bought the item
how much time ago the user bought something from the same category
how much time ago the user bought something from the same sub category


(and similar)

Is it worth trying with an RNN? If yes, should I try to go with tensorflow or caffe?

Thank you!
There is nothing "wrong" about weighting different actions to get a measure of preference between a user and an item, and then using ALS to compute a latent feature space. This is quite common in my experience. However, the consequence of ALS is that it can detect categories and sub-categories using individual user/item interactions. So, I don't see why you need to be adding higher level preference data into your user/item matrix. The weighting should be done using only behavior that indicates preference between a specific user and specific item, not user/category or user/sub-category interactions - ALS will detect if a user likes a category on its own.

How to weight the preference behavior is somewhat tricky, but you can use heuristics or information from your data. For example, a page view is not as strong as a product purchase and should be weighted less. You might look at the distribution of page views vs purchases to get an idea how common one is vs the other, to develop a weighting scheme.

I am sure that you could also use an RNN in a classification setting, to predict the next item that a user will purchase given an input sequence of the last n items they've purchased or interacted with. The framework you use depends on your preference, for Python based Keras, MXNet, PyTorch, and Tensorflow are all worthy. For easy Spark integration and JVM-based, DL4J is a good choice.