|
1243 | 1243 | }, |
1244 | 1244 | { |
1245 | 1245 | "cell_type": "markdown", |
1246 | | - "id": "6cfe6035-99a3-4502-82e3-4fce712304eb", |
| 1246 | + "id": "0515579c-6b1b-4c77-863e-79ea0ee097f3", |
1247 | 1247 | "metadata": {}, |
1248 | 1248 | "source": [ |
1249 | | - "Predictor corrector (SES)\n", |
| 1249 | + "**Predictor corrector (SES)**\n", |
| 1250 | + "\n", |
| 1251 | + "\\begin{align}\n", |
| 1252 | + "\\ell_t = \\ell_{t-1} + &\\alpha (y_t - \\ell_{t-1}) \\\\\n", |
| 1253 | + "&\\text{In words} \\\\\n", |
| 1254 | + "\\text{New Prediction = old prediction +} & \\text{weighted*(observation - old prediction)}\n", |
| 1255 | + "\\end{align}\n", |
1250 | 1256 | "\n", |
1251 | | - "$\\ell_t = \\ell_{t-1} + \\alpha (y_t - \\ell_{t-1})$\n", |
| 1257 | + "**One Step ahead Prediction:**\n", |
1252 | 1258 | "\n", |
1253 | | - "New Prediction = old prediction + weighted*(observation - old prediction)\n", |
| 1259 | + "\\begin{align}\n", |
| 1260 | + "\\ell_t &= \\ell_{t-1} + K \\, T_{t-1} \\\\\n", |
| 1261 | + "\\text{where }& K \\text{ is the number of timesteps into the future.} \\\\\n", |
| 1262 | + "\\text{If }& K=1,\\quad \\ell_t = \\ell_{t-1} + T_{t-1}\n", |
| 1263 | + "\\end{align}\n", |
1254 | 1264 | "\n", |
| 1265 | + "**Continuation of Predictor corrector**" |
| 1266 | + ] |
| 1267 | + }, |
| 1268 | + { |
| 1269 | + "cell_type": "markdown", |
| 1270 | + "id": "6cfe6035-99a3-4502-82e3-4fce712304eb", |
| 1271 | + "metadata": {}, |
| 1272 | + "source": [ |
1255 | 1273 | "\n", |
1256 | | - "then you go into Before:\n", |
| 1274 | + "Before:\n", |
1257 | 1275 | "\n", |
1258 | 1276 | "$\\ell_t = \\alpha y_t + \\ell_{t-1} (1-\\alpha)$\n", |
1259 | 1277 | "\n", |
1260 | 1278 | "$\\ell_t=\\ell_{t-1}$\n", |
1261 | 1279 | "\n", |
1262 | | - "\n", |
1263 | 1280 | "After:\n", |
1264 | 1281 | "\n", |
1265 | 1282 | "T: Trend -> Change in level \n", |
1266 | 1283 | "\n", |
1267 | 1284 | "$(\\ell-\\ell_{t-1})$ -> obersvation of the trend (slope)\n", |
1268 | 1285 | "\n", |
1269 | | - "Beta: Another constant \n", |
| 1286 | + "Beta: Another constant, $ 0 \\le \\beta \\le 1$\n", |
| 1287 | + "\n", |
| 1288 | + "$\\ell_t = \\ell_{t-1} + K * T_{t-1}$\n", |
| 1289 | + "\n", |
| 1290 | + "$\\ell_t=(\\ell_{t-1} + T_{t-1})+\\alpha(y_t-[\\ell_{t-1}+T_{t-1}])$\n", |
1270 | 1291 | "\n", |
1271 | | - "$\\ell_t = \\ell_{t-1} + K * T_{T-1}$\n", |
| 1292 | + "$T_t=T_{t-1}+\\beta((\\ell-\\ell_{t-1})-T_{t-1})$\n", |
1272 | 1293 | "\n", |
1273 | | - "$\\ell_t=(\\ell_{t-1} + T_{T-1})+\\alpha(y_t-[\\ell_{t-1}+T_{T-1}])$\n", |
1274 | 1294 | "\n", |
1275 | | - "$T_t=T_{t-1}+\\beta((\\ell-\\ell_{t-1})-T_{T-1})$\n", |
| 1295 | + "To continue the Predictor-Corrector idea\n", |
| 1296 | + "\n", |
| 1297 | + "Prediciton: $\\ell_t=(\\ell_{t-1} + T_{t-1})$\n", |
| 1298 | + "\n", |
| 1299 | + "The corrector now includes not only the level but the trend as well.\n", |
| 1300 | + "\n", |
| 1301 | + "$\\ell_t=(\\ell_{t-1} + T_{t-1})+\\color{red}\\alpha(y_t-[\\ell_{t-1}+T_{t-1}]) $\n", |
| 1302 | + "\n", |
| 1303 | + "To get the trend estimates:\n", |
| 1304 | + "\n", |
| 1305 | + "$T_t=T_{t-1}+\\beta((?)-T_{t-1})$\n", |
| 1306 | + "\n", |
| 1307 | + "We can make an asummption that since we have $\\ell_t$ as known componts we can use the differece between two times steps to be the \"slope\" or observation of the trend.\n", |
| 1308 | + "\n", |
| 1309 | + "$T_t=T_{t-1}+\\beta(\\color{red}(\\ell-\\ell_{t-1})\\color{black}-T_{t-1})$\n", |
| 1310 | + "\n", |
| 1311 | + "This equation updates the trend of the current time step based on the different between previous level estimates.\n", |
1276 | 1312 | "\n", |
1277 | 1313 | "Known componets:\n", |
1278 | 1314 | "\n", |
|
1283 | 1319 | "$\\ell=(\\ell_1, \\ell_2, \\ell_3...\\ell_t)$\n", |
1284 | 1320 | "\n", |
1285 | 1321 | "Estimated trends :\n", |
1286 | | - "$T=(T_1,T_2,T_3...T_{T-1})$\n", |
| 1322 | + "$T=(T_1,T_2,T_3...T_{t-1})$\n", |
1287 | 1323 | "\n" |
1288 | 1324 | ] |
1289 | 1325 | }, |
|
1294 | 1330 | "metadata": {}, |
1295 | 1331 | "outputs": [], |
1296 | 1332 | "source": [] |
| 1333 | + }, |
| 1334 | + { |
| 1335 | + "cell_type": "code", |
| 1336 | + "execution_count": null, |
| 1337 | + "id": "2980aa18-1760-4a00-8471-2503a7943dea", |
| 1338 | + "metadata": {}, |
| 1339 | + "outputs": [], |
| 1340 | + "source": [] |
1297 | 1341 | } |
1298 | 1342 | ], |
1299 | 1343 | "metadata": { |
|
0 commit comments