Implementation of Electric Load Forecasting Based on LSTM(BiLSTM). Including Univariate-SingleStep forecasting, Multivariate-SingleStep forecasting and Multivariate-MultiStep forecasting.
I have the data:
I want use the pre 10 colums to predict the 11th colums,and want use the multi lstm to forecast,as:
model = Sequential()
layers = [1, 75, 100, prediction_steps]
model.add(LSTM(layers[1], input_shape=(None, layers[0]), return_sequences=True)) # add first layer
model.add(Dropout(0.2)) # add dropout for first layer
model.add(LSTM(layers[2], return_sequences=False)) # add second layer
model.add(Dropout(0.2)) # add dropout for second layer
model.add(Dense(layers[3])) # add output layer
model.add(Activation('linear')) # output layer with linear activation
start = time.time()
model.compile(loss="mse", optimizer="rmsprop")
print('Compilation Time : ', time.time() - start)
return model
how shoul i do?
Hi, I am learning your wonderful code.
Now i met a problem about the code : pred = pred[:, -1, :]
Why does just get the last column about the pred?
Could you explain in more detail to me, Thanks a lot!
Hello, good work. I have some doubts. The code is a prediction of testdata, and it doesn't output future results. How can I get the values that didn't happen in the future?
I use my data, have two colums, one is timestamp, one is value.
And use the Multivariate-SingleStep-LSTM and Multivariate-MultiStep-LSTM, the list index out of range: