Created
June 1, 2019 04:53
-
-
Save singhrahuldps/a23de948b97aad5d0d40c45aafbca1e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get list of unique user ids | |
users = sorted(list(set(ratings[user_col].values))) | |
# get list of unique item ids | |
items = sorted(list(set(ratings[item_col].values))) | |
# generate dict of correponding indexes for the user ids | |
user2idx = list_2_dict(users) | |
# generate dict of correponding indexes for the item ids | |
item2idx = list_2_dict(items) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment