Tuesday, 27 October 2020

Evaluate recommendations after training a model

First of all, I would like to create a recommender system. With the help of a neural network, this is supposed to make a prediction of which articles user X is most likely to buy.

I have already trained a model with the right datasets and the help of the neuMF model (you can also look at the different layers in the picture).

enter image description here [Source https://arxiv.org/abs/1708.05031]

My dataset contains the following:

enter image description here

The column event contains whether the user has looked at an item (view), placed it in the shopping cart (addtocart) or bought it (transaction).

I have already found example implementations of how they determine the recommendations. The following was written about it:

Now that I've trained my model, I'm ready to recommend songs for a given playlist! However, one issue that I encountered (see below) is that I need the embedding of that new playlist (as stored in my model) in order to find the closest relevant playlists in that embedding space using kmeans. I am not sure how to get around this issue- as is, it seems that I have to retrain my whole model each time I get an input playlist in order to get that playlist embedding. Therefore, I just test my model on a randomly chosen playlist (which happens to be rock and oldies, mostly!) from the training set.

To recommend songs, I first cluster the learned embeddings for all of the training playlists, and then select "neighbor" playlists for my given test playlist as all of the other playlists in that same cluster. I then take all of the tracks from these playlists and feed the test playlist embedding and these "neighboring" tracks into my model for prediction. This ranks the "neighboring" tracks by how likely they are (under my model) to occur next in the given test playlist.

[Source https://github.com/caravanuden/spotify_recsys]

I've just trained my model and now I'd like to make a recommendation as to which items User X is most likely to buy. Do I have to carry out another implementation of an algorithm that determines, for example, the nearest neighbors (knn) or is it sufficient to train the model and then derive the data from it?

How do I proceed after I have trained the model with the data, how do I get the recommendations from it? What is state of the art in this area in order to receive the recommendations from the trained model?

Thanks in advance. Looking forward to suggestions, ideas and answers.



from Evaluate recommendations after training a model

No comments:

Post a Comment