1
0
mirror of https://github.com/newnius/YAO-optimizer.git synced 2025-12-13 08:26:43 +00:00
This commit is contained in:
2020-05-02 09:34:28 +08:00
parent 868a231f42
commit 9a9cbd60ae
2 changed files with 4 additions and 4 deletions

View File

@@ -110,10 +110,10 @@ lstm_model.predict(train_reshaped, batch_size=batch_size)
predictions = list()
for j in range(len(test_scaled)):
# make one-step forecast
X, y = test_scaled[j, 0:-1], test_scaled[j, -1]
yhat = forecast_lstm(lstm_model, batch_size, X)
#X, y = test_scaled[j, 0:-1], test_scaled[j, -1]
yhat = forecast_lstm(lstm_model, batch_size, test_scaled)
# invert scaling
yhat = invert_scale(scaler, X, yhat)
yhat = invert_scale(scaler, test_scaled, yhat)
# invert differencing
yhat = inverse_difference(raw_values, yhat, len(test_scaled) + 1 - j)
# store forecast