# Prognozy hierarchiczne i uzgadnianie

EN: **Hierarchical forecasting and reconciliation** · id `hierforecasting` · aliases: forecast reconciliation, hierarchical time series, grouped time series forecasting

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Uczenie maszynowe](https://aiatlasgraph.com/t/ml.md) › [Szeregi czasowe: prognozy, anomalie i klasyfikacja](https://aiatlasgraph.com/t/timeseries.md) › Prognozy hierarchiczne i uzgadnianie

## Description

- PL: Metody zapewniające spójność prognoz w strukturach agregacji: oddolne, odgórne, od środka oraz optymalne uzgadnianie prognoz bazowych wszystkich poziomów.
- EN: Methods ensuring coherent forecasts across aggregation structures: bottom-up, top-down, middle-out and optimal reconciliation of base forecasts from all levels.

## In one sentence

- PL: Prognozowanie liczb na kilku poziomach naraz, na przykład dla sklepów, regionów i całego kraju, tak żeby części sumowały się do całości.
- EN: Forecasting numbers at several levels at once, such as stores, regions and the whole country, so that the parts add up to the total.

## Problem it solves

- PL: Prognozy robione osobno dla sklepów i dla regionu nie sumują się, więc działy planują na sprzecznych liczbach.
- EN: Forecasts made separately for stores and for the region do not add up, so departments plan on conflicting numbers.

## What it does

- PL: Najpierw prognozuje każdy poziom, a potem koryguje wszystkie liczby naraz, jak księgowy uzgadniający kolumny, żeby suma się zgadzała.
- EN: It forecasts every level first, then adjusts all numbers together, like an accountant reconciling columns so the totals match.

## Everyday example

- PL: Firma turystyczna prognozuje noclegi dla miejscowości, województw i całego kraju, a plan krajowy zgadza się z sumą planów regionalnych.
- EN: A tourism company forecasts overnight stays for towns, provinces and the whole country, and the national plan matches the sum of regional plans.

## This concerns you if you…

- PL: raportujesz liczby na kilku poziomach szczegółowości
- PL: różne zespoły planują na różnych poziomach
- PL: prognozy części nie zgadzają się u ciebie z całością
- EN: report numbers at several levels of detail
- EN: different teams plan at different levels
- EN: forecasts for parts do not match the total

## Keywords

bottom-up · top-down · middle-out · MinT reconciliation · OLS reconciliation · grouped time series · temporal hierarchies · hierarchicalforecast · fable reconcile

## How it works

- PL: Metoda oddolna sumuje prognozy najniższego poziomu, odgórna rozdziela prognozę całości proporcjami, a metoda od środka łączy oba kierunki. Uzgadnianie prognozuje wszystkie serie, a potem przekształca je w spójny zestaw; MinT dobiera kombinację minimalizującą łączną wariancję błędów przy zachowaniu nieobciążoności.
- EN: Bottom-up sums lowest-level forecasts, top-down splits the total forecast by proportions, and middle-out combines both directions. Reconciliation forecasts all series, then maps them to a coherent set; MinT chooses the combination minimising total error variance while staying unbiased.

## Limits

- PL: Optymalne uzgadnianie wymaga oszacowania kowariancji błędów, co przy tysiącach serii jest trudne i niestabilne. Podejście odgórne gubi dynamikę pojedynczych serii, a uzgadnianie nie naprawi słabych prognoz bazowych.
- EN: Optimal reconciliation needs an error covariance estimate, which is hard and unstable for thousands of series. Top-down loses individual series dynamics, and reconciliation cannot fix weak base forecasts.

## Key terms

- PL: **spójność (coherence)**: Prognozy części sumują się do prognozy całości.
- PL: **MinT**: Uzgadnianie minimalizujące łączną wariancję błędów prognoz.
- PL: **struktura grupowana**: Krzyżujące się podziały, np. produkt i region jednocześnie.
- EN: **coherence**: Forecasts of the parts add up to the forecast of the total.
- EN: **MinT**: Reconciliation minimising the total variance of forecast errors.
- EN: **grouped structure**: Crossed splits, such as product and region at once.

## Know first

- [Algebra liniowa: wektory i macierze (Linear algebra: vectors and matrices)](https://aiatlasgraph.com/t/linearalgebra.md)

## Sources

- [Forecasting: Principles and Practice (3rd ed.), ch. 11: Forecasting hierarchical and grouped time series](<https://otexts.com/fpp3/hierarchical-forecasting.html>) `fpp3-ch11-hierarchical` · by Rob J Hyndman, George Athanasopoulos
- [M5 accuracy competition: Results, findings, and conclusions](<https://statmodeling.stat.columbia.edu/wp-content/uploads/2021/10/M5_accuracy_competition.pdf>) `makridakis-m5-accuracy-2022` · by Spyros Makridakis, Evangelos Spiliotis, Vassilios Assimakopoulos

---

AI Atlas revision 126 (2026-11-03) · HTML: https://aiatlasgraph.com/t/hierforecasting · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-11-03
