PeterChe1990 / GRU-D

GRU-D, a GRU-based model with trainable decays for multivariate time series classification with missing values/irregular samplings
MIT License
118 stars 37 forks source link

Applying GRU-D on own data #3

Closed edwinlebreton closed 4 years ago

edwinlebreton commented 4 years ago

Hi,

With my research lab we are trying to apply GRU-D to our health metrical data. Unfortunately, when running the Run script, starting the first epoch, we have the following error apparently coming from the data_handler:

Capture d’écran 2020-02-27 à 15 33 08 Capture d’écran 2020-02-27 à 15 33 20

Have you ever seen something similar coming from this part of the code ?

Sorry if our issue looks basic, we are Data Science beginners students.

Thanks

PeterChe1990 commented 4 years ago

The error comes from Line 128/129 in data_hanlder.py. Maybe your own data have not been formatted in the way mentioned in the README.md:

In [WD]/data/${dataset_name}/data.npz, there are input, masking, timestamp, label_${label_name}. Each of them is of the shape (n_samples, ...) In [WD]/data/${dataset_name}/fold.npz, there are fold_${label_name}, mean_${label_name}, std_${label_name}. Each of them is of the shape (k_fold, 3, ...), for train/validation/test sets in k-fold cross validation.

Also, it seems that Line 128 was modified incorrectly: inputs = [self._data[s][batch_fold] for s in ['input', 'masking', 'timestamp']] should not be self._data[s][0], otherwise the data generator would always generate the first input sample from the dataset.