0

i'm currently trying to forecast weather using LSTM with 4 variables and i wanted to get the prediction of each variables. In my mind right now there should be 4 models which has the same architecture just having different inputs? i have 10 years worth of daily data and i wanted to predict 1 year of each variables.

here is the architecture i have right now, this is just a sample i'm currently making and i'm doing the model.fitwith validation_split as i have yet to split the data

model = Sequential()
model.add(LSTM(64, activation='relu', input_shape=(trainX.shape[1], trainX.shape[2]), return_sequences=True))
model.add(LSTM(32, activation='relu', return_sequences=False))
model.add(Dropout(0.2))
model.add(Dense(trainY.shape[1]))

model.compile(optimizer='adam', loss='mse')
model.summary()

I wanted to know :

  1. Is the model i made right? since i'm forecasting for a different variable each time is it still right to have the dense of 1? (regression should have 1 output or so i have read the argument i passed has the value of 1)
  2. How to differentiate univariate and multivariate in the code? do i need to add something above because i'm trying to do multivariate forecasting?
  3. Say i'm looking backward 30 days, and predicting 1 day forward, this would mean i will need the predicted data as the input for my 31th data and so on how to get this? or will the library do all the work?
Wonderweis
  • 75
  • 3
  • 9

0 Answers0