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.
Forecast hierarchical series. Plan reconciliation checks.
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.
Learning concept · Not a validated service
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.
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.
Collect multiple related series with matching timestamps and an explicit hierarchy table (child → parent mapping). Handle missing timestamps and align series before feature creation.
Construct lags, rolling statistics and calendar indicators per series while only using past values for training to avoid leakage.
Fit simple regressors per series or per aggregation level, retaining models and residuals for reconciliation analysis.
Apply bottom-up or optimal reconciliation, evaluate MAE/RMSE at each level, and inspect aggregate consistency and interval coverage.
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.
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())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.
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.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.