Fix naive predictions to forecast multiple time steps, fixes #421

main
Aurélien Geron 2021-05-27 18:13:10 +12:00
parent 661d591b04
commit e5b5a39c49
1 changed files with 1 additions and 1 deletions

View File

@ -583,7 +583,7 @@
"metadata": {},
"outputs": [],
"source": [
"Y_naive_pred = Y_valid[:, -1:]\n",
"Y_naive_pred = np.tile(X_valid[:, -1], 10) # take the last time step value, and repeat it 10 times\n",
"np.mean(keras.metrics.mean_squared_error(Y_valid, Y_naive_pred))"
]
},