You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
James Kirk edited this page Jul 27, 2018
·
3 revisions
TensorRec allows you to define the algorithm that will be used to compute recommendation scores from a pair of latent representations of your users and items.
You can define a custom prediction function yourself, or you can use a pre-made prediction function that comes with TensorRec in tensorrec.prediction_graphs.
DotProductPredictionGraph
This prediction function calculates the prediction as the dot product between the user and item representations. Prediction = user_repr * item_repr
CosineSimilarityPredictionGraph
This prediction function calculates the prediction as the cosine between the user and item representations. Prediction = cos(user_repr, item_repr)
EuclideanSimilarityPredictionGraph
This prediction function calculates the prediction as the negative euclidean distance between the user and item representations. Prediction = -1 * sqrt(sum((user_repr - item_repr)^2))