Skip to content

Instantly share code, notes, and snippets.

@singhrahuldps
Created June 1, 2019 04:52
Show Gist options
  • Save singhrahuldps/21210684e5ad72eac9beb57a57cddae4 to your computer and use it in GitHub Desktop.
Save singhrahuldps/21210684e5ad72eac9beb57a57cddae4 to your computer and use it in GitHub Desktop.
# get a batch -> (user, item and rating arrays) from the dataframe
def get_batch(ratings, start:int, end:int):
return ratings[user_col][start:end].values, ratings[item_col][start:end].values, ratings[rating_col][start:end].values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment