hfawaz/InceptionTime

NaN value handling

VincentSch4rf opened this issue · 4 comments

Dear authors,

Thank you very much for contributing to transparent and open research by sharing the implementation of your InceptionTime Network!

I am currently looking into reproducing your results in the context of a work in Time Series Classification. However, after porting the code to tensorflow 2.6 and running it successfully for some datasets, I ran into a "Model saving" issue. This turned out to be due to missing values in the time series, e.g. DodgersLoopDay, and as a result all the values within the model including the outputs becoming NaN.

This is to be expected, however, I did not find any note in your paper or the code that gives a hint on how you have dealt with missing values in your initial work.

It would be awesome if you could provide some details on how you handled missing values in your work.

Best Regards
Vincent

Hi,
I am also being stuck in the same step, not knowing how the authors have handled the NaN values. Any information regarding the same would be great

Best,
Anand

@7anand7s since there is no response from the authors yet, I just wanted to let you know, that I was able to reproduce their original results on the datasets that include missing values using simple zero imputation. To use the existing code base, you would have to alter the readucr(...) function in utils/utils.py as follows:

def readucr(filename, delimiter='\t'):
    data = np.loadtxt(filename, delimiter=delimiter)
    Y = data[:, 0]
    X = np.nan_to_num(data[:, 1:])
    return X, Y

I hope I was able to help you with that!

Hello,

The latest version of the UCR Archive had fixed the issue of NaN values and non-equal length time series in some datasets also.