Skip to content

Commit

Permalink
Merge pull request #1686 from microsoft/andreas/remove_cast
Browse files Browse the repository at this point in the history
Remove casting of user and item IDs in Spark evaluation
  • Loading branch information
anargyri authored Mar 31, 2022
2 parents 3a6e2d4 + 5064320 commit 8e632dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions recommenders/evaluation/spark_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
)

Expand Down

0 comments on commit 8e632dd

Please sign in to comment.