Firstly, thank you so much for making a great package!
Currently LightFM cannot divide data into train/test temporally, i.e. "train on all data except last 6 months, test on data from last 6 months". If I wrote this, would it simply be a case of:
Test set is a sparse matrix of all the data
Training set is a sparse matrix of all the data as of time t, with all data after t set to x where x is whatever a non interaction is. So if my data is 1 for "customer bought product" and 0 for "customer has never bought product" then set data > t as 0.
Then it would fit into LightFM's precision_at_k and auc_score() functions, as you could pass train and test to train_interactions and test_interactions respectively?
Firstly, thank you so much for making a great package!
Currently LightFM cannot divide data into train/test temporally, i.e. "train on all data except last 6 months, test on data from last 6 months". If I wrote this, would it simply be a case of:
Then it would fit into LightFM's
precision_at_k
andauc_score()
functions, as you could pass train and test totrain_interactions
andtest_interactions
respectively?