aqibsaeed / Multilabel-timeseries-classification-with-LSTM

Tensorflow implementation of paper: Learning to Diagnose with LSTM Recurrent Neural Networks.
Apache License 2.0
573 stars 188 forks source link

Data format #9

Closed AnconaAndrea closed 5 years ago

AnconaAndrea commented 5 years ago

First of all, thank you for the code!

I know it has already been discussed, but it is not clear to me the data format in the csv file needed to run your code. Does it have to be two coloumns, first coloumn with the full time series and in the second coloum the label associated with each time step? or what else?

Thank you!

aqibsaeed commented 5 years ago

The data should be in the format below, considering X and Y to be numpy arrays: X: (batch_size, time_steps, n_features) and Y: (batch_size, n_classes) For instance, assume you have triaxial accelerometer data and some classes in csv, then start with segmenting it to have the same shape as above and perform one hot encoding to generate class labels. See this post, if you need help with pre-processing. Hope this helps.