Generates train batches from PSG data to be used by the `train_batches()` function.
Character vector of EDF files paths to be included in the train batches.
List of events dataframes containing hypnograms corresponding to EDF records in `records` parameter.
Character. Path where batches files will be saved.
Character vector. Channels labels to include in the dataset.
Integer. Sample rate to resample selected signals.
Epochs added before and after each epoch.
Number of epochs in each batch file.
Boolean, display status messages or not.
Chambon, S., Galtier, M., Arnal, P., Wainrib, G. and Gramfort, A. (2018) A Deep Learning Architecture for Temporal Sleep Stage Classification Using Multivariate and Multimodal Time Series. IEEE Trans. on Neural Systems and Rehabilitation Engineering 26:(758-769).