mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-14 12:14:36 +01:00
Fix naive predictions to forecast multiple time steps, fixes #421
This commit is contained in:
@@ -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))"
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user