Answers.Body: <p>You don't need to Encoder-Decoder here. When using seq2seq learning for text (for example, for translation) you need encoder-decoder to encode the words into the numeric vectors and decode the vectors into the words. Therefore, for your numerical case, you don't need an encoder or decoder to train the RNN.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-15T07:16:57.870Z
Answers.Text: In encoder-decoder architecture, encoder purpose is not just only to encode text into numbers, its purpose is to generate a context vector, which is a compact representation of input vector.
Answers.UserDisplayName: Asif Khan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-15T09:12:31.223Z
Answers.Text: @AsifKhan right. But, in this case, it is not helful.
Answers.UserDisplayName: OmG
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-16T16:51:37.753Z
Answers.LastActivityDate: 2019-02-21T11:16:11.087Z
Answers.LastEditDate: 2019-02-21T11:16:11.087Z
Answers.UserDisplayName: OmG
Answers.Body: <p>Why you need encoder and decoder here, this is not a use case for this. If you want to convert one sequence to another sequence then you can use encoder-decoder. You can use simple seq2seq learning for below purpose.</p>
  
  <ol>
  <li>Sequence   </li>
  <li>Sequence Prediction </li>
  <li>Sequence Classification</li>
  <li>Sequence Generation Sequence to Sequence Prediction
  You can use below simple seq2seq method to predicate the next sequence 
  Sequence prediction attempts to predict elements of a sequence on the basis of the preceding elements.
  <a href="https://machinelearningmastery.com/sequence-prediction/" rel="nofollow noreferrer">https://machinelearningmastery.com/sequence-prediction/</a></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-21T06:56:37.267Z
Answers.LastActivityDate: 2019-02-21T06:56:37.267Z
Answers.UserDisplayName: Maheshwar Ligade
Body: <p>I am trying to understand how RNNs are used for sequence modelling.</p>
  
  <p>On a <a href="https://blog.keras.io/a-ten-minute-introduction-to-sequence-to-sequence-learning-in-keras.html" rel="nofollow noreferrer">tutorial here</a>, it mentions that if you want to translate say a sentence from English to French you can use an encoder-decoder set-up as they described.</p>
  
  <p>However what if you want to do a sequence to sequence modelling where your inputs and outputs are of the same domain but you just want to predict the next output of a sequence.</p>
  
  <p>For example if I want to use sequence modelling to learn the sine function. So say I have 20 y-coordinates from <span class="math-container">$y = sin(x)$</span> from 20 evenly spaced out x-coordinates and I want to predict the next 10 or so y-coordinates. Would I use an encoder-decoder setup here? </p>
  
Tags: <deep-learning><natural-language-processing><recurrent-neural-networks><machine-translation>
Title: Do I need an encoder-decoder architecture to predict the next item of a sequence?
UserDisplayName: piccolo
ThreadText: # Do I need an encoder-decoder architecture to predict the next item of a sequence?
  
  (Asked by: username_0 on 2019-02-16)
  
  I am trying to understand how RNNs are used for sequence modelling.
  
  On a [tutorial here](https://blog.keras.io/a-ten-minute-introduction-to-sequence-to-sequence-learning-in-keras.html), it mentions that if you want to translate say a sentence from English to French you can use an encoder-decoder set-up as they described.
  
  However what if you want to do a sequence to sequence modelling where your inputs and outputs are of the same domain but you just want to predict the next output of a sequence.
  
  For example if I want to use sequence modelling to learn the sine function. So say I have 20 y-coordinates from $y = sin(x)$ from 20 evenly spaced out x-coordinates and I want to predict the next 10 or so y-coordinates. Would I use an encoder-decoder setup here?
  
  **Tags:** deep-learning, natural-language-processing, recurrent-neural-networks, machine-translation
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-02-16. Score: 2 | Accepted answer
  
  You don't need to Encoder-Decoder here. When using seq2seq learning for text (for example, for translation) you need encoder-decoder to encode the words into the numeric vectors and decode the vectors into the words. Therefore, for your numerical case, you don't need an encoder or decoder to train the RNN.
  
  > **Comments:**
  > **username_2**: In encoder-decoder architecture, encoder purpose is not just only to encode text into numbers, its purpose is to generate a context vector, which is a compact representation of input vector.  
  > **username_1**: @AsifKhan right. But, in this case, it is not helful.  
  
  ---
  
  ### Answer by username_3 on 2019-02-21. Score: 1
  
  Why you need encoder and decoder here, this is not a use case for this. If you want to convert one sequence to another sequence then you can use encoder-decoder. You can use simple seq2seq learning for below purpose.
  
  1. Sequence
  2. Sequence Prediction
  3. Sequence Classification
  4. Sequence Generation Sequence to Sequence Prediction
     You can use below simple seq2seq method to predicate the next sequence
     Sequence prediction attempts to predict elements of a sequence on the basis of the preceding elements.
     <https://machinelearningmastery.com/sequence-prediction/>
  
  
  ---
  
  