hookeai.time_series_data.time_dataset.add_dataset_feature_init

add_dataset_feature_init(dataset, feature_label, feature_init)[source]

Add feature initialization to all samples of time series data set.

Parameters:
  • dataset (torch.utils.data.Dataset) – Time series data set. Each sample is stored as a dictionary where each feature (key, str) data is a torch.Tensor(2d) of shape (sequence_length, n_features).

  • feature_label (str) – Feature label.

  • feature_init (torch.Tensor(2d)) – Feature initialization data stored as torch.Tensor(2d) of shape (n, n_features), where n is a general size.

Returns:

dataset – Time series data set. Each sample is stored as a dictionary where each feature (key, str) data is a torch.Tensor(2d) of shape (sequence_length, n_features).

Return type:

torch.utils.data.Dataset