0
$\begingroup$

I am trying to understand how RNNs are used for sequence modelling.

On a tutorial here, 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?

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Asif Khan Nov 15 at 7:16
  • 1
    $\begingroup$ @AsifKhan right. But, in this case, it is not helful. $\endgroup$ – OmG Nov 15 at 9:12
0
$\begingroup$

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/
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.