{ "cells": [ { "cell_type": "markdown", "id": "464b3196-9af3-40f1-b990-e186fed6f9a9", "metadata": { "editable": true, "slideshow": { "slide_type": "slide" }, "tags": [] }, "source": [ "# Introduction to Morden Time Series Forecasting\n", "\n", "## Feng Li\n", "\n", "### Guanghua School of Management\n", "### Peking University\n", "\n", "\n", "### [feng.li@gsm.pku.edu.cn](feng.li@gsm.pku.edu.cn)\n", "### Course home page: [https://feng.li/bdcf](https://feng.li/bdcf)" ] }, { "cell_type": "markdown", "id": "00eb486b-23aa-476f-b97f-40963f3167dd", "metadata": { "editable": true, "slideshow": { "slide_type": "slide" }, "tags": [] }, "source": [ "## Elements of good forecasts: *state-of-the-art perspectives*\n", "\n", "- Robust again a large collection of time series data.\n", "\n", " - What if I do not have any benchmark data?\n", " - Build a model on machine-generated data and test on real data.\n", "\n", "- Properly tackling model uncertainty and data uncertainty.\n", "\n", " - What shall we do when all forecasting models fail?\n", " - Can we forecast without historical data?\n", "\n", "- Good speed performance with a large scale of time series.\n", "\n", " - Most forecast models could not scale up.\n", " - A need for a distributed forecasting framework." ] }, { "cell_type": "markdown", "id": "2ac7adbc-dc11-4838-8cb7-d1989ceace17", "metadata": { "editable": true, "slideshow": { "slide_type": "slide" }, "tags": [] }, "source": [ "## Time series features\n", "\n", "- Features of time series produce more accurate forecasting accuracies.\n", "\n", "- Features give forecasting method selection rules.\n", "\n", "- \"Horses for courses\": effects of time series features for the forecasting performances.\n", "\n", "- Visualize the performances of different forecasting methods in a 2D space for a better understanding of their relative performances." ] }, { "attachments": {}, "cell_type": "markdown", "id": "1d5af79a-517e-47a8-a42f-779470a81a41", "metadata": { "editable": true, "slideshow": { "slide_type": "slide" }, "tags": [] }, "source": [ "![image.png](figures/time-series-features.png)" ] }, { "cell_type": "markdown", "id": "f7627624-6c89-4824-b197-00d48436cf8c", "metadata": { "editable": true, "slideshow": { "slide_type": "slide" }, "tags": [] }, "source": [ "## Predict the forecasting model performance\n", "\n", "- Train a time series model (*machine learning with dependent data*)\n", " is usually costly.\n", "\n", "- New algorithms a re developed every day.\n", "\n", "- A well trained model with `my dataset` does not necessary work well\n", " for `your dataset`. Why?\n", "\n", "- Is there a way to **forecast which algorithm works the best** for\n", " any time series *ex-ante* ?\n", "\n", " - Unrealistic because we could not collect all the time series in\n", " the world.\n", " - But we could work on the time series feature space." ] }, { "cell_type": "markdown", "id": "5fe14ee0-2e4c-41c3-970e-b7d6ac4a2b63", "metadata": { "editable": true, "slideshow": { "slide_type": "slide" }, "tags": [] }, "source": [ "## Distributed forecasting with ultra-long time series\n", "\n", "- Ultra-long time series are increasingly accumulated in many cases.\n", "\n", " - hourly electricity demands\n", "\n", " - daily maximum temperatures\n", "\n", " - streaming data generated in real-time\n", "\n", "- Forecasting these time series is challenging.\n", "\n", " - time-consuming training process\n", "\n", " - hardware requirements\n", "\n", " - unrealistic assumption that the DGP remains invariant over a\n", " long time interval" ] }, { "attachments": {}, "cell_type": "markdown", "id": "5a094ab8-c9ff-46a4-b53a-173280889652", "metadata": { "editable": true, "slideshow": { "slide_type": "slide" }, "tags": [] }, "source": [ "![electricity-example.png](figures/electricity-example.png)\n", "\n", "https://doi.org/10.1016/j.ijforecast.2022.05.001" ] }, { "cell_type": "markdown", "id": "696227e5-217b-4248-aae4-ae363e99445f", "metadata": { "editable": true, "slideshow": { "slide_type": "slide" }, "tags": [] }, "source": [ "## Hierarchical time series\n", "\n", "- Hierarchical time series are special network data.\n", "\n", "- Constants exist that the forecasts on each hierarchy should be **coherent** with the aggregation structure.\n" ] }, { "cell_type": "markdown", "id": "07c3652f-2d8a-4f13-a5e2-a4bcae5388ea", "metadata": { "editable": true, "slideshow": { "slide_type": "slide" }, "tags": [] }, "source": [ "![image](figures/M5data.png)\n", "https://doi.org/10.1016/j.ijforecast.2021.12.015" ] }, { "cell_type": "markdown", "id": "29fa5c4b-a408-4fbb-abd3-6924d9b1cbf2", "metadata": { "editable": true, "slideshow": { "slide_type": "slide" }, "tags": [] }, "source": [ "## Hierarchical forecasting\n", "\n", "- Hard to use multivariate time series models, like VARs, because the bottom level is highly noisy or intermittent.\n", "\n", "- Copula models are hard to scale up.\n", "\n", "- Pure deep learning models fail to meet the **coherent constant**." ] } ], "metadata": { "kernelspec": { "display_name": "Python (forecasting)", "language": "python", "name": "forecasting" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.3" } }, "nbformat": 4, "nbformat_minor": 5 }