mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-02-01 20:47:50 +01:00
Fix naive predictions to forecast multiple time steps, fixes #421
This commit is contained in:
@@ -583,7 +583,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"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))"
|
"np.mean(keras.metrics.mean_squared_error(Y_valid, Y_naive_pred))"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user