0

I am working on forecasting multi-steps of a multivariate time series using Encoder-Decoder Time Series. The forecasting is done autonomously i.e. each of the input feature is forecasted. I want to specify the feature that will be forecasted without forecasting other features. This is because I want to modify some of the features (like inject a set of different data) and make the prediction to see if the forecasting model is able to capture the data modified in a series to make the forecast of the other features (specified) accurately. I am currently using keras framework for the implementation of the Enc-Dec LSTM. Below is the code snippet:

n_features = 8
n_steps_in, n_steps_out = 50, 100
model = Sequential()
model.add(LSTM(50, activation='relu', input_shape=(n_steps_in, n_features)))
model.add(RepeatVector(n_steps_out))
model.add(LSTM(50, activation-'relu', return_sequences=True))
model.add(TimeDistributed(Dense(n_features)))
model.compile(optimizer='adam', loss='mse')
train_history = model.fit(X, y,epochs=50, verbose=2, shuffle=False)

Can someone help, please?

I have tried introducing another layer before the last layer and change the value of n_features in the last layer, but this only reflects the number of feature to forecast. The problem is I need to specify which feature I am forecasting and which on I am dropping from the predicting process.

model.add(TimeDistributed(Dense(50, activation='relu')))

Hayat
  • 1
  • 2

0 Answers0