Recall
- class rectools.metrics.classification.Recall(k: int)[source]
Bases:
SimpleClassificationMetricRatio of relevant recommended items among all items user interacted with after recommendations were made.
- The recall@k equals to
tp / likedwhere tpis the number of relevant recommendations among firstkitems in the top of recommendation list;likedis the number of items the user has interacted (bought, liked) with (in period after recommendations were given).
- Parameters
k (int) – Number of items in top of recommendations list that will be used to calculate metric.
- Inherited-members
Methods
calc(reco, interactions)Calculate metric value.
calc_from_confusion_df(confusion_df)Calculate metric value from prepared confusion matrix.
calc_per_user(reco, interactions)Calculate metric values for all users.
calc_per_user_from_confusion_df(confusion_df)Calculate metric values for all users from prepared confusion matrix.
Attributes
- The recall@k equals to