Module sbr::data[][src]

Funcionality for manipulating data.

Structs

CompressedInteractions

A compressed representation of interactions, where the interactions themselves are arranged by user and by timestamp.

CompressedInteractionsUser

A single user's data, arranged from earliest to latest.

CompressedInteractionsUserChunkIterator

Chunked iterator over a user's interactions. The chunks are such that the first chunk is smallest, and the remaining chunks are all of chunk_size.

CompressedInteractionsUserIterator

Iterator over compressed user data.

Interaction

Basic interaction type.

Interactions

A collection of individual interactions.

TripletInteractions

Interactions in COO form.

TripletMinibatch

A minibatch of triplet interactions.

TripletMinibatchIterator

Iterator over minibatches of triplet interactions.

Functions

train_test_split

Randomly split interactions between test and traiing sets.

user_based_split

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.