advanced26 min studyLesson 838 in Engineering

Make aggregate forecasts add up

Construct coherent forecasts with a summing matrix and explain the assumptions behind covariance-weighted reconciliation.

On this page

What you’ll understand

  • Write a hierarchy as a full-column-rank summing matrix.
  • Compute an ordinary least-squares reconciliation.
  • Separate coherence from nonnegativity, accuracy, and distributional calibration.

A region’s predicted demand is 100 jobs, while its two sites predict 70 and 60. Each model may look plausible independently, but a planner cannot satisfy all three numbers as one allocation. Reconciliation maps these base forecasts into the subspace defined by the aggregation rules. This is a linear algebra problem with operational assumptions attached: the target units, issue cutoffs, hierarchy version, and horizon must agree before addition makes sense. Coherence removes a contradiction; it does not by itself prove that the resulting forecasts are accurate or appropriate for every downstream constraint.

Represent the aggregation contract

For a hierarchy with two bottom series A and B, the ordered vector is total, A, B. A summing matrix maps bottom values to that vector by adding them in its first row and copying each in the remaining rows. More complicated grouped structures can contain several overlapping aggregation dimensions. Specify a stable row and column ordering and preserve it in the artifact. A correct matrix applied to forecasts in a different order can generate coherent-looking but semantically wrong outputs.

Use additive quantities on a common interval and unit. Total requests can be summed across disjoint sites; average utilization percentages cannot generally be summed without denominators. A hierarchy change such as moving a site between regions changes the summing matrix and the interpretation of historical residuals. Version membership at the forecast’s intended target period, with a policy for planned future changes. Avoid mixing base forecasts built under different membership snapshots and hoping the reconciliation step will infer the intended structure.

y=Sb,S=(111001),y~=SGy^y=S b,\qquad S=\begin{pmatrix}1&1\\1&0\\0&1\end{pmatrix},\qquad \tilde y=S G\hat y
b∈R² contains bottom series in order A,B; y and base forecast ŷ∈R³ are ordered total,A,B. G is 2×3. S has full column rank and dimensionless aggregation coefficients; all forecast entries share units.↔ Scroll wide equations horizontally.

Choose the adjustment geometry

Ordinary least squares finds the coherent vector closest to the base vector in unweighted squared distance. Covariance-weighted reconciliation instead uses a positive-definite forecast-error covariance matrix for the specified horizon. The inverse covariance encodes which combinations of base errors are relatively uncertain. Estimate that matrix from appropriate historical out-of-sample errors, with regularization when the number of series is large relative to the available residual sample. Using training residuals or the wrong horizon can misrepresent the adjustment geometry.

The MinT result concerns a class of linear unbiased coherent estimators under its error and covariance assumptions. It does not promise lower realized error for every individual series or every future period. If the covariance is proportional to the identity, the displayed formula reduces to ordinary least squares. Solve the corresponding linear systems rather than forming explicit inverses in implementation, and detect singular or ill-conditioned estimates. A covariance matrix estimated from only a few highly correlated residuals may need shrinkage or another documented fallback.

G=(S⊤Wh−1S)−1S⊤Wh−1,GS=IG=(S^\top W_h^{-1}S)^{-1}S^\top W_h^{-1},\qquad GS=I
W_h is a symmetric positive-definite covariance matrix of base forecast errors at horizon h, with target-units squared. S has full column rank. GS=I preserves any already coherent forecast; the minimum-trace unbiased interpretation additionally assumes unbiased base forecasts.↔ Scroll wide equations horizontally.

Validate what reconciliation does not enforce

The unconstrained projection can produce negative bottom forecasts even when the underlying quantity is a nonnegative count. Enforcing nonnegativity requires a separate constrained optimization and changes the estimator. Rounding each component independently can also break exact additivity; integer allocation requires a declared rounding or optimization rule. Check coherence numerically after all postprocessing, not only immediately after the matrix multiplication. Keep raw base values so reviewers can inspect which series absorbed the largest adjustments.

Marginal quantiles cannot generally be added as though they were means. Distributional reconciliation needs a justified joint construction; reconciling joint samples path by path is one route when the sample dependence model is appropriate. Assess calibration and interval behavior afterward rather than assuming coherence preserves them automatically. In production, promote base models, hierarchy matrices, covariance estimates, and postprocessing rules as a compatible bundle so a forecast cannot accidentally combine one model generation with another hierarchy generation.

Project an inconsistent total and two sites

Take base forecasts ordered as (total,A,B)=(100,70,60), with equal error weights W=I and the displayed S. Compute the ordinary least-squares coherent forecasts. Compare the squared adjustment with bottom-up forecasts that retain 70 and 60.

  1. Compute SᵀS=[[2,1],[1,2]] and Sᵀŷ=(170,160). Solving [[2,1],[1,2]]b=(170,160) gives bottom values b=(60,50).

  2. Apply S to obtain reconciled forecasts (110,60,50). Their adjustments relative to the base vector are (+10,−10,−10), and total 110 equals 60+50.

  3. Squared adjustment is 10²+10²+10²=300. Bottom-up retains (70,60), producing (130,70,60) and squared adjustment 30²=900 under this equal-weight objective.

The result

OLS distributes the inconsistency across all three forecasts because the chosen geometry treats their errors equally. This smaller adjustment is not proof of smaller realized forecasting error.

Explore the model

Interactive lab

Interactive lab · matrix

Inspect a linear transform’s geometry

Reset, set Diagonal scale a to 1 and Shear b to 1. Predict determinant 1 and singular values approximately 1.618 and 0.618 before Step. Reset, set a=2 and b=0, then Step: predict determinant 2 and singular values 2 and 1. Readouts describe the selected final matrix even while geometry interpolates. This invertible 2D triangular family illustrates matrix geometry; it is not the 3×3 reconciliation projection or a general hierarchy solver.

Inspect a linear transform’s geometryThe selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Current readings: Area scale · det A: 1.4; Singular values · σmax, σmin: 1.597, 0.876; Condition number · κ₂(A): 1.823. All parameters are adjustable with the labeled controls below.Matrix A with first row 1.4, 0.6 and second row zero, one; display interpolates between identity and A while final determinant remains 1.4.−4−2024−2−1012x · equal geometric scaleyA = [ 1.4 0.6 ; 0 1 ]Display blend: 0% · final values below
Interpolated geometryOriginal unit squareSelected final transform
Area scale · det A
1.4
Singular values · σmax, σmin
1.597, 0.876
Condition number · κ₂(A)
1.823
t = 0 s

The selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forA matrix’s dimensions and constraints matter; one transform family cannot stand in for every projection.

Check your understanding

Which statement follows from the displayed reconciliation formula under its stated assumptions?

Try it yourself

With W=I, reconcile base forecasts (total,A,B)=(90,40,35) under the same S. Find the coherent vector and its squared adjustment.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

The base total exceeds the sum of its two sites by 15. Equal-weight OLS spreads this discrepancy across the three entries.

Compare with the solution

The solution is bottom b=(45,40), giving coherent vector (85,45,40). Adjustments are (−5,+5,+5), whose squared sum is 25+25+25=75. Bottom-up would use total 75 and leave the sites unchanged, creating squared adjustment 225. Neither calculation alone identifies the forecasts closer to future truth.

Take it with you

  • Build aggregation matrices from compatible units, horizons, and memberships.
  • Covariance-weighted reconciliation needs defensible error estimates.
  • Check nonnegativity, rounding, and calibration as separate properties.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.