gzerveas / mvts_transformer

Multivariate Time Series Transformer, public version
MIT License
727 stars 171 forks source link

Handle unlabelled ts files #15

Closed gameldar closed 2 years ago

gameldar commented 2 years ago

Thanks for this code and the paper!

I found an issue when working with the ts file format - if I was using unlabelled data and so defined @classlabel false in the header section of the file then it would throw an exception when running. The issue is that the return from load_from_tsfile_to_dataframe will return a tuple when @classlabel is true, but just the dataframe when @classlabel is false. Therefore, when unpacking the expected from load_from_tsfile_to_dataframe it would throw an exception, and fall back to your implementation, however this assumes that the last column is a label and you end up with a truncated data set.