Calculating Precision and Recall without binary data

23 Views Asked by At

I am currently working with recommender systems and would like to calculate the precision and recall of my models. The formulas for the precision and recall are as following: $Precision= \frac{TP}{TP + FP}$, $Recall={\frac {TP}{TP+FN}}$

I was wondering how I should be able to calculate the true/false positives/negatives, since my calculation is a rating instead of binary data, e.g. predicted values are [4.7, 5.2, 3.4] and actual values are [5, 5, 3]. I have already calculated the MAE and RMSE of those values.