train_test_split: Creates cross-validation set from user-item interactions

View source: R/utils.R

train_test_splitR Documentation

Creates cross-validation set from user-item interactions

Description

Basic splitting of the user-item interaction matrix into train and testing part. Useful for when data doesn't have time dimension. Usually during model tuning it worth to keep some x matrix as hold-out data set. Then this x could be splitted in 2 parts - train and test. Model tries to predict test data using train

Usage

train_test_split(x, test_proportion = 0.5)

Arguments

x

sparse user-item interation matrix. Internally Matrix::TsparseMatrix is used.

test_proportion

- proportion of the observations for each user to keep as "test" data.


dselivanov/rsparse documentation built on May 25, 2022, 3:04 p.m.