-
Notifications
You must be signed in to change notification settings - Fork 220
Prediction Graphs
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.
This prediction function calculates the prediction as the dot product between the user and item representations.
Prediction = user_repr * item_repr
This prediction function calculates the prediction as the cosine between the user and item representations.
Prediction = cos(user_repr, item_repr)
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))