Summary
The framework specifies one measurement contract that every shadow application implements. A shadow provides \(\Phi(\omega, t)\) on a frequency × time grid; the framework derives everything else. Source: framework/metrics/metrics.md + framework/metrics/atoms.md.
Inputs from a shadow application
Phi(omega, t): 2-D array, dimensions \((N_\omega, N_t)\). Non-negative for energy density.omegas: 1-D frequency-grid centres, length \(N_\omega\). Log-uniform or uniform.times: 1-D snapshot times, length \(N_t\). Monotone-increasing. Carries the cadence-stamp required by Theorem 7.
Optionally: Phi_total(t), J(omega, t), D(omega, t).
Primitive metrics
Cascading value at \((\omega, t)\)
\(\Phi(\omega, t)\) — direct from input.
Local rate \(\rho(\omega, t)\)
Centred finite difference at the snapshot cadence:
\[ \rho(\omega, t_i) \;=\; \frac{\Phi(\omega, t_{i+1}) - \Phi(\omega, t_{i-1})}{t_{i+1} - t_{i-1}} \]
Local dissipation rate \(\varepsilon(\omega, t)\) — the primary brake metric
The pointwise irreversible component of the local energy budget. \(\varepsilon > 0\) is the universal brake principle (Section IV.A of the primitive law). Computed as \(\varepsilon = -\rho - \Pi_{\text{in}} + \Pi_{\text{out}} + J - D\) where the flux components are derivable from \(\Phi\) (the flux is tooling, not a primitive).
Brake exponent \(\beta(\omega)\)
Per-band ordinary least squares of \(\log|\rho|\) against \(\log\Phi\) over the time window where \(\Phi\) varies non-trivially. Returns \(\beta\), \(\log\alpha\), \(R^2\), residual AR(1) coefficient \(\rho_{\text{AR}(1)}\).
Three independent brake estimators
Each returns the same named tuple. Disagreement between estimators signals model misspecification.
- polyfit (OLS). Naive baseline. Bootstrap CI from 1,000 resamples (deterministic seed).
validation/code/regression.py· polyfit_brake_p - GLS-AR(1) (Cochrane–Orcutt). Iterative GLS with first-order autoregressive residuals. Returns \(\rho_{\text{AR}}\) for diagnostics.
gls_ar1_brake_p - Bayesian (Laplace + Metropolis). MAP + Laplace covariance, Metropolis sampling for credible intervals. Weakly-informative priors: \(\alpha, \beta \sim \mathrm{Normal}(0, 10^2)\), \(\log \sigma \sim \mathrm{Normal}(0, 5^2)\), \(\rho_{\text{AR}} \sim \mathrm{Uniform}(-1, 1)\). Textbook defaults from Gelman et al., NOT calibrated to any cascade.
bayesian_brake_p
Documented failure modes
The framework reports honestly when its primitive does not fit. Documented modes:
- Narrow log-range. When \(\log|\Phi_{\max}/\Phi_{\min}| \lesssim 1\), Theorem 3 binds. Confidence intervals too wide.
- Strong residual autocorrelation. \(|\rho_{\text{AR}}| \gtrsim 0.7\): naive OLS CIs too narrow; GLS-AR(1) and Bayesian-AR(1) correct for this.
- Inflow-dominated band. Form \(\rho = -\alpha \Phi^\beta\) does not apply.
- Steady state. \(\rho \approx 0\); use \(\varepsilon\) directly.
- Bump-hunt instances at low sample size. Cascade-style tools (PELT, EMD, wavelet) do not improve sideband-exponential bump-hunt at \(\sim 22\) bins. The honest reporting is the negative finding (Law V, Theorem 12).