Doubts with Keras RNN formats and layers
<p>Ok, I know this has been asked before but I'm afraid I have not fully grasped the comments/solutions, so let me write here my own problem:</p>

<p>It's a very basic problem. I have an array <code>X_train</code> of shape <code>(35584,)</code> that represents measures each hour for several years. I also have the correspondent <code>Y_train</code> with shape <code>(35584,)</code> as the expected values. As you see, a simple regression problem. But the values of an hour h are affected by values of, say, the previous 6 hours, so I want to use a RNN.</p>

<p>In Keras, I understand that for my case: <code>timesteps = 6</code> and <code>nb_samples = 35584</code>. In my case, <code>nb_features = 1</code>. </p>

<p>How can I program this in Keras? Should I use <code>Embedding</code> layer? And how to do it?</p>

<p>Any help will be valuable, but I would appreciate not only code, but also explanations. IMHO, a pedagogical tutorial/book on the use of Keras is missing.</p>

<p>Ok, I'm going to self answer this question in case it can be useful for someone. How to do a regression with a RNN in Keras it is very well explained here. The blog, besides, has a lot of resources for machine learning and the explanations are superb. Strongly recommended. Link with the explanations of formats, layers, stateful states and so on: </p>

<p><a href="http://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/" rel="nofollow">http://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/</a></p>

python neural-network keras recurrent-neural-network