-1

I implemented LSTM model seems like its predicting the trend correctly but underestimating all the time. Is there any way to fix it?

I am using multiple feature values in future and the target value in t-1 to predict. I am using sequence length =7 to forecast and the result is like below:

enter image description here

model used:

def LSTM_model():
activation = 'linear'

inputs = keras.Input(shape=input_shape)
x = layers.LSTM(512, activation=activation)(inputs)
x = layers.Dense(2 * 1024)(x)
output = layers.Dense(1)(x)

model = Model(inputs=inputs, outputs=output)
model.compile(optimizer='Adam', loss='mse', metrics=[r2_score])

return model
Farza
  • 1
  • 1

0 Answers0