Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

GluonTS Probabilistic Time Series Forecasting

Welcome! This tutorial teaches you how to build probabilistic forecasting models with GluonTS. We use a synthetic-data-first approach: you’ll learn GluonTS fundamentals with clean, interpretable synthetic data, then apply them to a real-world COVID-19 forecasting pipeline.

The tutorials are interactive and focused on learning. Implementation details live in reusable Python utilities so notebooks stay clean and readable—you focus on understanding how probabilistic forecasting works.

What you’ll learn:

COVID-19 Case Prediction Using GluonTS

Learning Path

  1. GluonTS.API.ipynb — Start here. Learn GluonTS fundamentals with synthetic data (sinusoid, multi-frequency, regime change). No data download needed. Covers DeepAR, SimpleFeedForward, DeepNPTS.
  2. GluonTS.example.ipynb — Real-world application. Full COVID-19 forecasting pipeline with JHU + mobility data, feature engineering, and scenario analysis.

Getting Started

Data Setup

GluonTS.API.ipynb uses synthetic data—no download needed. GluonTS.example.ipynb requires COVID data. Files are automatically downloaded when you run the example notebook. If automatic download fails, you can download them manually.

Automatic Download (Default)

Just run a notebook—it will:

  1. Check if data exists locally
  2. Download any missing files from Google Drive
  3. Continue with analysis

No setup needed.

Manual Download (If Blocked)

Download from: https://drive.google.com/drive/folders/1qMDGBstdY8H2hYpz8xSolhzNOsVxNHMA

Save to data/ directory:

Or run:

python GluonTS_utils.py

Build and Run

Build Docker image:

./docker_build.sh

Takes ~1-2 minutes the first time, ~30 seconds after.

Start Jupyter:

./docker_jupyter.sh

Opens at http://localhost:8888

Or use interactive shell:

./docker_bash.sh

Files and Structure

Notebooks

Utilities

Data (auto-downloaded)

Documentation

Docker

Notebook Design

The notebooks are organized for learning. Implementation details (data loading, plotting, model training) are in utility modules. Notebooks focus on the learning narrative—explanations, results, and insights.

Instead of notebook cells with 20 lines of matplotlib code, you see:

import GluonTS_utils as gluonts
gluonts.plot_data_overview(train_df, test_df)

This keeps notebooks clean and readable.

Model Comparison

ModelExternal FeaturesTraining TimeBest Use Case
DeepARYes (deaths, mobility, CFR)1 minComplex patterns, highest accuracy
SimpleFeedForwardNo30-40 secQuick baselines, stable trends
DeepNPTSYes (deaths, mobility, CFR)15-20 secRegime changes, distribution shifts

Data Pipeline

Features Used

Metrics Explained

Learning Resources

GluonTS

Research Papers

Data Sources