# How to process data in a data stream for a LSTM

How can a data stream for a RNN (LSTM) be handled, when the stream contains data sets belonging to different prediction classes?

Training phase: I have trained a LSTM to predict a class out of a sequence of Letters. For the training phase I used a fixed data array where the beginning an the ending of a sequence belonged to a class. Of course there is a little noise but the whole data set was labled with a class. E.g:

Seq.    is  Class
ABC     is  One
CBA     is  Two
ABD     is  Three


The network predicts well when it sees a static data array.

Problem in Prediction Phase: During prediction the LSTM will receive a data stream where there is a sequence off arrays but there is no delimiter. The data set can not be distinguished or separated. I am not sure how it would perform when I have a data stream for different classes like ABCABCCBAABD.

I guess in speech recognition one must face similiar problems.

• u need to do some feature engineering possibly Feb 18 at 10:48