Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IJCAI-contest dataset #39

Merged
merged 53 commits into from
Nov 12, 2024
Merged

Add IJCAI-contest dataset #39

merged 53 commits into from
Nov 12, 2024

Conversation

yiweny
Copy link
Contributor

@yiweny yiweny commented Oct 6, 2024

Adds code to run ContextGNN on IJCAI-contest dataset

Best test metrics: HR@1 0.4113 HR@5 0.6031 HR@10 0.6671 ndcg_5 0.5133189321177055 ndcg_10 0.5343443259121663

@yiweny yiweny changed the title Create IJCAI-contest dataset [WIP]Create IJCAI-contest dataset Oct 14, 2024
@yiweny yiweny force-pushed the yyuan/ijcai-contest branch from c0f4562 to 5c54008 Compare October 16, 2024 23:16
@yiweny yiweny changed the title [WIP]Create IJCAI-contest dataset Add IJCAI-contest dataset Oct 21, 2024
@yiweny yiweny requested review from rusty1s and zechengz October 21, 2024 06:36
@yiweny yiweny requested a review from janericlenssen October 21, 2024 07:23
indices = torch.randint(0, all_sampled_rhs.size(0), (1000, ))
sampled_items = all_sampled_rhs[indices]

random_items[i, :] = sampled_items[
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sample 1000 items, pick 100 items that are not in positive item of this user

target_item = target[user_idx]
if target_item is not None:
random_items[i, 0] = target_item
selected_scores = torch.gather(scores, 1, random_items)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pick the scores of the random_items

@yiweny yiweny merged commit b4b2ba7 into master Nov 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants