Keras LSTM Dimensions
When creating an RNN, we generally assume there is some temporal correlation, for example: that the data has a time-series nature, like the price of a stock. We might consider a window of 30 days as the timestep for a single sample.

When creating input data for an LSTM layer, you need to consider how many timesteps are included in one of your samples, and put the data into that shape. The input shape should be (number_of_sample, num_timesteps, num_features):

Take a look at this answer for more information.

Your data then might be able to be reshaped:

new_shape = data.reshape((None, 100, 4))       # new input shape to LSTM



None means you let the number of samples be whatever it must in order to fit your original data shape.
100 means you pass 100 sequential datapoints/timesteps as a single sample
4 is your number of independent variables (features)


That reshape might throw an error if your data cannot be reshaped to make the dimensions you want. You might need to trim your data (i.e. leave some of teh oldest samples out)