title: Batch size for panel data for LSTM in Keras
body: <p>I have repeated measurements on subjects, which I have structured as input to an LSTM model in Keras as follows: </p>
  
  <pre><code>batch_size = 1
  model = Sequential()
  model.add(LSTM(50, batch_input_shape=(batch_size, time_steps, features), return_sequences=True))
  </code></pre>
  
  <p>Where time_steps are the number of measurements on each subject, and features the number of available features on each measurement. Each row of the data is one subject.</p>
  
  <p>My question is regarding the batch size with this type of data.
  Should I only use a batch size of 1, or can the batch size be more than 1 subjects?</p>
  
  <p>Related to that, would I benefit from setting stateful to True? Meaning that learning from one batch would inform the other batches too. Correct me if my understanding about this is not right too.</p>