## Basic Time Series Classification Examples

3

3

I've been using matlab until now to classify a large number of labelled time series I have. This has been relatively successful but I'd like to try using Tensorflow to apply a Deep Learning paradigm instead.

I'm a complete noob at this and so I'm a bit overwhelmed with the literature as I'm struggling to generalise examples such as the 0-9 digits classification examples to my problem.

My current code reads in the 1064 time series (length 3125), reads in the labels, converts the labels to onehot_encoding and extracts training and validation sets.

#Not all code included
#Get labels from the labels.txt file
labels = labels.values

return data, labels

data, labels = read_data()

# Default split is 75% train 25% test
ts_train, ts_test, labels_train, labels_test = train_test_split(data,labels)

onehot_encoder = OneHotEncoder(sparse=False)
labels_train = onehot_encoder.fit_transform(labels_train)
labels_test = onehot_encoder.fit_transform(labels_test)

#Construct the graph
batch_size = 100
seq_len = 3125
learning_rate = 0.0001
epochs = 1000


But now I need to construct the graph and I'm a bit lost. If someone could link me some useful examples I'd be very grateful thank you.

Question was closed 2018-02-17T05:56:06.530

7

What you need to learn are RNNs and LSTMs. Here are some links I used to learn these:

Also I would suggest you to use Keras, a Tensorflow API. In my experience, it makes working with RNNs and LSTMs way easier, if you're a beginner.

I found these articles which seemed related to your problem:

Keywords to search: Time series classification tensorflow keras

Thank you for the comprehensive reply. I'll investigate Keras and the links and report back. – user1147964 – 2018-02-05T17:05:27.147

Happy coding! Also, if you find this answer useful, please accept it. – Gaurav Kumar – 2018-02-05T18:17:24.030