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(Dropout(0.4, input_shape=(train_input_data_NN.shape[1], train_input_data_NN.shape[2])))
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])))
model.add(Dense(1))
model.compile(loss='mae', optimizer='adam')


How do I get the predictions to be more similar to the true data?
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()
model.add(LSTM(40, input_shape=(trainX.shape[1], trainX.shape[2])))
model.add(Dense(1))
model.compile(loss='mean_absolute_error', optimizer='adam')
model.fit(trainX, trainY, epochs=10, batch_size=1, verbose=0)


Here is my result: blue is real value, orange is predict.