Overview
The SVD Latent factor recommender model starts by assembling the ratings matrix. Next, it uses truncated SVD (see also SVD Decomposition)
SVD Decomposition
The SVD decomposition, decomposes the ratings matrix as
{% A = U \Sigma V^T %}
That is, the rating that user {% i %} assigns to product {% j %}
is
{% \sigma_{i} u_i v_j ^T %}
where {% u_i %} is the {% i^{th} %} row of {% U %} and {% v_j %} is the {% j^{th} %} row of {% V %}.
This is approximately true if the decomposition is done using the truncated SVD algorithm.
Based on this observation, the rows of the truncated {% U %} are taken as latent factor encodings of each user, and the rows of the truncated {% V %} are taken as latent vector encodings of the products. To find the similarity between two users is then computed by applying a simlarity measure (typically cosine similarity) to the latent factor encodings.
Use in Neural Networks
The latent encodings developed above can be used within a neural network. When predicting a rating for a user and an item, the analyst concatenates the user vector encoding, given above, and the item encoding into a single vector. That vector then becomes the input into the neural network. The output of the network should be a single output predicting the rating that the given user would give the selected item.