I am working on time series prediction using RNN and tensorflow. I am not sure how to get confidence interval from the distribution which may or may not be defined in the internal memory state of the rnn_decoder .

This way I can plot the distribution like ARIMA:

or Gaussian Process

Here is the code I am working on:

https://github.com/guillaume-chevalier/seq2seq-signal-prediction

Here is the definition for tf.contrib.legacy_seq2seq.basic_rnn_seq2seq .

with variable_scope.variable_scope(scope or "basic_rnn_seq2seq"): enc_cell = copy.deepcopy(cell) _, enc_state = rnn.static_rnn(enc_cell, encoder_inputs, dtype=dtype) return rnn_decoder(decoder_inputs, enc_state, cell)

And rnn_decoder

It should be similar to logits in the discrete case(namely softmax cross entropy). I have tried passing a custom loop function in the decoder but the code was not working at all. My second guess was to write a custom decoder but need someone pointing to the right direction.