When exactly do we need to prepare sequential data for the LSTM? Example - for image captioning and music generation, we prepared sequential data, but for a task like sarcasm detection, we won’t do it. I just want a clarity on the same. { Examples that differentiate the 2 would be helpful}
Sequential Data preparation
Hey @ambika11, we need to prepare sequential data when we have all training examples given in a single sequence. Let me explain this to you with 2 different examples.
-
Suppose you are working on stock price prediction for a share price, and you dataset comprises of share price on each day ordered in 360 rows, with each row having 2 columns, 1 date and 2nd share price. Now suppose you decided to build lstm model that predicts share price, with lets say previous 5 days share price. Now try to answer this question to yourself,
" Is every row of data, contains all information to be passed to predict the share price, i.e. your row contains information for previous 5 days or not." The answer is ofcourse not. So it means you had to prepare sequential data in this case. -
Suppose you are working on another problem emoji prediction, with 250 sentences in training dataset. Now in this case also you decided to use LSTM model to predict the final emoji. You need to pass the sentence to model and it will predict emoji. Your complete sentence is itself the sequential data. So try to answer the same question in case 1 now. Is your current training row related to previou row, Of course not. It has no relation with current row. So here you need to preprocess data but no need to prepare sequential data.
HOpe this resolved your doubt. 