Skip to content

Commit

Permalink
fix top_k for toppop (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
yinsn authored Sep 5, 2022
1 parent eefdf5f commit 6a9f108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rsdiv/recommenders/ials.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def get_topk_single_user(
"""
scores = self.get_score_single_user(user_string, keep_indices)
if scores is None:
original_indices = self._get_toppop_keep(keep_indices)
original_indices = self._get_toppop_keep(keep_indices)[:top_k]
else:
rank = self.get_topk_indices(scores, top_k)
original_indices = keep_indices[rank]
Expand Down

0 comments on commit 6a9f108

Please sign in to comment.