# Improving LSTM Time-series Predictions

I have been getting poor results on my time series predictions with a LSTM network. I'm looking for any ideas to improve the model.

The above graph shows the True Data vs. Predictions. The True Data is smooth zig zag shaped, from 0 to 1. However the predictions rarely reach 0 or 1.

The distribution in the prediction data-set rarely reaches 0 or 1 and it's centered around 0.5.

However the distributions in the True Data set is evenly distributed.

Here is the LSTM model built in keras:

model = Sequential()
model.add(Bidirectional(LSTM(30, dropout=0.4, return_sequences=False, recurrent_dropout=0.4), input_shape=(train_input_data_NN.shape[1], train_input_data_NN.shape[2])))


How do I get the predictions to be more similar to the true data?

• Are you sure there is a lot of signal in there? Can you overfit on your training data? You are using a lot of dropout, maybe try reducing that. – Jan van der Vegt Mar 20 '18 at 10:36
• It is very noisy data, and it does over-fit easily even with this level of dropout. – Aaron Isaac Mar 20 '18 at 11:22
• Why aren't you returning sequences, and why are you using bidirectional? If you are predicting at each timestep and you have access to all the features at the whole timeline (for bidirectional) then that would make sense to me, but maybe I'm missing something – Jan van der Vegt Mar 20 '18 at 11:40

I have just used LSTM to train a model predict time series value and get good result as below:

# reshape input to be [samples, time steps, features]
trainX = np.reshape(trainX, (trainX.shape[0], 1, trainX.shape[1]))
testX = np.reshape(testX, (testX.shape[0], 1, testX.shape[1]))

model = Sequential()