torch::dataloaderAvoids users having to manually define their own dataloaders.
get_dataloaders(
dataset,
train_proportion,
train_batch_size,
test_batch_size,
standardize = TRUE,
shuffle_train = TRUE,
shuffle_test = FALSE,
seed = 1
)A list containing:
A torch::dataloader for the training data.
A torch::dataloader for the test data.
A data.frame. The last column is assumed to be the dependent variable.
numeric, between 0 and 1. Proportion of data to be used for training.
integer, number of samples per batch in the training dataloader.
integer, number of sampels per batch in the testing dataloader.
logical, whether to standardize input-features, default is TRUE.
logical, whether to shuffle the training data each epoch. default is TRUE
logical, shuffle test data, default is FALSE. Usually not needed.
integer. Used for reproducibility purposes in the train/test split.