title: Input for LSTM using one hot encoding
body: <p>Time series forecasting: My data contains fo categorical values and to predict the next value. The categorical values are converted into one hot encode values using keras.</p>
  
  <pre><code>[[0. 0. 0. ... 0. 0. 0.]
   [0. 0. 0. ... 0. 0. 0.]
   [0. 0. 0. ... 0. 0. 0.]
   ...
   [0. 0. 0. ... 0. 0. 0.]
   [0. 0. 0. ... 0. 0. 0.]
   [0. 0. 0. ... 0. 0. 0.]]
  </code></pre>
  
  <p>Shape of the encoded values is </p>
  
  <pre><code>(824,8734)
  </code></pre>
  
  <p>Data contains of 1 sample with 824 time steps to predict the next time step.</p>
  
  <pre><code>n_steps=3
  n_features=1
  
  </code></pre>
  
  <p>What is the input shape for the LSTM?</p>
  
  <pre><code>I tried
  X.shape = (824, 8734, 3, 1)
  y.shape=(824,8734)
  </code></pre>
  
  <pre><code>model = Sequential()
  model.add(LSTM(50, activation='relu', input_shape=(n_steps, n_features)))
  model.add(Dense(1))
  model.compile(optimizer='adam', loss='mse')
  # fit model
  model.fit(X, y, epochs=20, verbose=0)
  
  
  ValueError: Input 0 is incompatible with layer lstm_3: expected ndim=3, found ndim=4
  </code></pre>