compute_sequences¶
- daart.data.compute_sequences(data: ndarray | list, sequence_length: int, sequence_pad: int = 0) list[source]¶
Compute sequences of temporally contiguous data points.
Partial sequences are not constructed; for example, if the number of time points is 24, and the batch size is 10, only the first 20 points will be returned (in two batches).
- Parameters:
data (array-like or list) – data to batch, of shape (T, N) or (T,)
sequence_length (int) – number of continguous values along dimension 0 to include per batch
sequence_pad (int, optional) – if >0, add sequence_pad time points to the beginning/end of each sequence (to account for padding with convolution layers)
- Returns:
batched data
- Return type:
list