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
# Inspired by: | |
# https://github.com/microsoft/recommenders/blob/main/recommenders/datasets/python_splitters.py | |
# - In "recommenders" library, when spliting by 'item', `python_stratified_split` puts both rows of movies with only two ratings in the training set. | |
# - This version here puts one in the training and one in validation set. | |
import pandas as pd | |
import numpy as np | |
DEFAULT_USER_COL = 'user' | |
DEFAULT_ITEM_COL = 'title' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.