01 / THE IDEA

Hierarchical time series forecasting in practice.

Hierarchical time series forecasting arranges related series (for example, store → city → country) so forecasts are coherent across levels. Key practises include building consistent timestamps, creating lag and seasonal features, defining train/test splits that respect temporal order, and reconciling level forecasts so aggregate and child forecasts sum correctly.

Real-world use case · Proposed extension

A proposed application: produce coherent daily sales forecasts at store, city and country levels so planners can aggregate predictions without manual adjustment. This extension is not implemented in the supplied starter.

02 / THE BUILD

How to build a hierarchical time series forecasting project
step by step.

01

Assemble hierarchical data

Collect multiple related series with matching timestamps and an explicit hierarchy table (child → parent mapping). Handle missing timestamps and align series before feature creation.

02

Create time features and lags

Construct lags, rolling statistics and calendar indicators per series while only using past values for training to avoid leakage.

03

Train per-node baselines

Fit simple regressors per series or per aggregation level, retaining models and residuals for reconciliation analysis.

04

Reconcile and evaluate

Apply bottom-up or optimal reconciliation, evaluate MAE/RMSE at each level, and inspect aggregate consistency and interval coverage.

03 / SOURCE SNAPSHOT

What the hierarchical time series forecasting starter actually does.

The supplied starter creates a single synthetic daily series, engineers a few lags and a 7-day rolling mean, trains a RandomForestRegressor on those features, and reports MAE and a short forecast table. It does not create or model multiple related series, nor does it perform hierarchical reconciliation or multi-level evaluation.

SOURCE EXCERPTPython
feature_cols = ["lag_1", "lag_7", "lag_14", "rolling_7"]
train = series.iloc[:-30]
test = series.iloc[-30:]

model = RandomForestRegressor(n_estimators=300, random_state=42)
model.fit(train[feature_cols], train["value"])
forecast = model.predict(test[feature_cols])

print(PROJECT_NAME)
print("MAE:", round(mean_absolute_error(test["value"], forecast), 3))
print(pd.DataFrame({"date": test["date"], "actual": test["value"], "forecast": forecast}).head())
Important limitation

The starter uses only one synthetic series and therefore implements no hierarchy: it lacks multiple related series, aggregation levels, reconciliation methods (bottom-up, top-down or optimal), and walk-forward validation across nodes.

04 / BEYOND THE CLASSROOM

Where a hierarchical time series forecasting project could go next.

PROPOSED BUSINESS CONCEPT

Pilot: coherent store-level forecasts

A proposed extension: replace the synthetic single series with a small multi-store sales dataset, train per-store and aggregated models, and apply a reconciliation method so store forecasts sum to city and country totals.

WHO IT COULD SERVERetail planners
FIRST MVPTrain per-node regressors on historical sales, apply a simple bottom-up reconciliation and report MAE at store and region levels with an aggregate consistency check.
KEY RISKModels may not generalise across stores with sparse history; a human reviewer should validate forecasts before operational use. This project is not suitable for automated financial or safety-critical decisions without further validation.

This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.

05 / WHAT YOU TAKE AWAY

What a hierarchical time series forecasting project puts on your resume.

  • Understand how to prepare and align multiple related time series with a defined hierarchy.
  • Create lag and rolling features while avoiding temporal leakage.
  • Train and evaluate baseline regressors and compute MAE on a holdout period.
  • Plan and implement forecast reconciliation so aggregates and child forecasts are coherent.
Want to build this with mentors and a lab?

Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.

AI Engineer Course
06 / QUESTIONS STUDENTS ASK

Hierarchical Time Series Forecasting project FAQs.

Is this suitable as a final year project?
Yes — it makes a strong applied final year project if you extend the starter to multiple related series, implement aggregation levels and reconciliation methods, and evaluate coherence across the hierarchy.
What skills and tools will I need?
You should know Python, pandas, scikit-learn, time-series feature engineering (lags, seasonality), and methods for reconciliation (bottom-up, top-down, optimal); experience with cross-validation for time series helps.
How do I evaluate progress and how long will it take?
Measure per-node forecast accuracy (MAE/RMSE), aggregation coherence and compute reconciliation error; a basic prototype with multiple levels and reconciliation can take 4–8 weeks depending on dataset complexity.