Skip to content

Commit

Permalink
shorten argument name
Browse files Browse the repository at this point in the history
  • Loading branch information
lthoang committed Dec 9, 2023
1 parent 8634db3 commit 94c1fe2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cornac/eval_methods/next_basket_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_gt_items(train_set, test_set, test_pos_items, exclude_unknowns):
user_idx,
item_indices,
history_baskets=history_baskets,
history_basket_indices=bids[:-1],
history_bids=bids[:-1],
uir_tuple=test_set.uir_tuple,
baskets=test_set.baskets,
basket_indices=test_set.basket_indices,
Expand Down
4 changes: 2 additions & 2 deletions cornac/models/gp_top/recom_gp_top.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ def score(self, user_idx, history_baskets, **kwargs):

if self.use_personalized_popularity:
if self.use_quantity:
history_basket_indices = kwargs.get("history_basket_indices")
history_bids = kwargs.get("history_bids")
baskets = kwargs.get("baskets")
p_item_freq = Counter()
extra_data = kwargs.get("extra_data")
for bid, iids in zip(history_basket_indices, history_baskets):
for bid, iids in zip(history_bids, history_baskets):
for idx, iid in zip(baskets[bid], iids):
p_item_freq[iid] += extra_data[idx].get("quantity", 0)
else:
Expand Down

0 comments on commit 94c1fe2

Please sign in to comment.