From f41dbd40f93e9e5b3e0fcb75058a889ac126a2d5 Mon Sep 17 00:00:00 2001 From: Andreas Argyriou Date: Tue, 29 Mar 2022 15:45:05 +0100 Subject: [PATCH] Remove casting of user and item IDs in Spark evaluation --- recommenders/evaluation/spark_evaluation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recommenders/evaluation/spark_evaluation.py b/recommenders/evaluation/spark_evaluation.py index d631b56c64..faf17bc365 100644 --- a/recommenders/evaluation/spark_evaluation.py +++ b/recommenders/evaluation/spark_evaluation.py @@ -99,13 +99,13 @@ def __init__( raise ValueError("Schema of rating_pred not valid. Missing Prediction Col") self.rating_true = self.rating_true.select( - col(self.col_user).cast("double"), - col(self.col_item).cast("double"), + col(self.col_user), + col(self.col_item), col(self.col_rating).cast("double").alias("label"), ) self.rating_pred = self.rating_pred.select( - col(self.col_user).cast("double"), - col(self.col_item).cast("double"), + col(self.col_user), + col(self.col_item), col(self.col_prediction).cast("double").alias("prediction"), )