Function sbr::data::user_based_split[][src]

pub fn user_based_split<R: Rng>(
    interactions: &Interactions,
    rng: &mut R,
    test_fraction: f32
) -> (Interactions, Interactions)

Split interactions between training and test sets so that no user is in both sets. Useful for testing generalization where we want to test the model's performance on users who have not been seen during training.