cascade-heat13-heat4-count-calendar
Heat13 is Heat4 plus one isolated mathematical update inside
seasonal_counts. It preserves Heat4's AR(1)/AR(2) stationary-SD corrections,
Heat3 curriculum, every family weight, observation settings, requirements, and
all unrelated generating methods.
Heat3 evidence
Across 10 snapshots and 2,663 windows, Heat3's main weakness was point error:
MASE 1.6605 versus Heat8's 1.4093, while Heat3 MWSQL was slightly better
(0.08348 versus 0.08485). Weak slices included daily, sales, nature,
economics, and healthcare. Energy, transport, 5-minute, and hourly performance
were strengths and remain untouched by this update.
Heat4's stationary AR corrections already improved the matched-token 07-25 score over Heat3 by 7.6%. Heat13 therefore uses Heat4 as its parent rather than restarting from uncorrected Heat3.
Weekly/annual count-rate submode
Twenty percent of seasonal_counts rows receive simultaneous weekly and annual
log-rate structure:
w_t = sin(2*pi*t/7 + phi_w)
a_t = sin(2*pi*t/365 + phi_a)
c_t = 0.50*w_t + 0.35*a_t + 0.15*w_t*a_t
z_t = A*c_t, with A ~ U(0.15, 0.40).
The interaction lets weekly amplitude vary through the year while keeping the main effects dominant. The periods target daily retail/reporting/count series, for which weekly and annual seasonality commonly coexist.
Exact rate preservation
Adding a centered effect in log space would still increase expected rates by Jensen's inequality. Heat13 instead computes a rate-weighted normalizer:
m_t = exp(z_t)
q = sum(lambda_t*m_t) / sum(lambda_t)
lambda'_t = lambda_t*m_t/q.
Therefore, before the existing safety clip,
sum(lambda'_t) = sum(lambda_t)
for every selected row (up to floating-point rounding). The update changes calendar allocation over time without changing the row's total expected count. It applies before both Poisson and Gamma-Poisson sampling, preserving nonnegative integer observations and existing overdispersion semantics.
Scope
Family and curriculum weights are unchanged:
seasonal_countsfinal weight: 7.5%, so effective scope is 1.5% of rows.- curriculum-start weight: 9.0%, so effective early scope is 1.8% of rows.
No family-weight nudge is included, keeping this A/B attributable to one generating-method update.
Research basis
- Forecasting: Principles and Practice — complex seasonality describes weekly and annual Fourier terms for daily data.
- Bayesian Forecasting of Many Count-Valued Time Series uses period-7 Fourier seasonality in Poisson models for supermarket sales.
- Stitch Fix dynamic harmonic regression combines Fourier seasonality with a Poisson log link for count data.
These sources support the weekly/annual Poisson-Fourier structure. They do not guarantee improvement on Cascade; matched-token Heat4/Heat13 training is still required.
Guardrails
Primary success criteria are lower overall MASE and score, with improvements in daily and sales slices. Guard Heat4's MWSQL and Heat3-line strengths: energy, transport, 5-minute, and hourly.
Validation must confirm:
- generator diff from Heat4 contains only this count-calendar block;
- config differs only in
nameanddescription; - requirements and all family/curriculum weights are byte-identical;
- rate totals are preserved numerically before clipping.