From 66ace3e6e273fd456eb65693e8ee96c6da1a0361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Dav=C3=B3?= Date: Wed, 26 Jun 2024 12:09:03 +0200 Subject: [PATCH] Fix python evaluation It turns out I ran incorrect tests and the evaluation module was not really working --- recommenders/evaluation/python_evaluation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recommenders/evaluation/python_evaluation.py b/recommenders/evaluation/python_evaluation.py index dff164ab4..9c7b9115f 100644 --- a/recommenders/evaluation/python_evaluation.py +++ b/recommenders/evaluation/python_evaluation.py @@ -435,9 +435,9 @@ def merge_ranking_true_pred( # count the number of hits vs actual relevant items per user df_hit_count = pd.merge( - df_hit.groupby(col_user, as_index=False)[col_user].agg({"hit": "count"}), + df_hit.groupby(col_user, as_index=False)[col_user].agg(hit="count"), rating_true_common.groupby(col_user, as_index=False)[col_user].agg( - {"actual": "count"} + actual="count", ), on=col_user, )