I am researching several different recommender systems, some of which are based on a user K-Nearest Neighbour algorithm and some of which are based on a matrix factorization algorithm. My dataset is sparse and consists of interactions between users and items. Now, I am trying to split the data into a train and test set. My initial idea would be naively splitting the known interactions randomly (80-20). However, this is impossible, as KNN and MF algorithms have different requirements:
- KNN: The test set should ideally contain the full profile of the user, i.e. it should contain all the known interactions of a set of test users.
- MF: The test set should only contain users who are also in the training set, i.e. at least one interaction of every user should be present in the training set.
The two requirements clearly conflict. However, for standardization purposes, there should be one dataset to cover both types of algorithms. I cannot find much information about this in the literature. Is there a standard way of splitting that can be used for both scenarios?