hookeai.time_series_data.time_dataset.time_collator

time_collator(batch_data)[source]

Collate time series batch data.

Ignores all features that are not stored as a torch.Tensor(2d) of shape (sequence_length, n_features).

Parameters:

batch_data (list[dict]) – Each batch sample data is stored as a dictionary where each feature (key, str) data is a torch.Tensor(2d) of shape (sequence_length, n_features).

Returns:

batch – Collated batch sample data for each feature (key, str), stored as torch.Tensor(3d) of shape (sequence_length, batch_size, n_features).

Return type:

dict