feat(cuqdyn-c): always produce both covariance varieties - #16
Draft
ZocoLini wants to merge 1 commit into
Draft
Conversation
The hidden states get their covariance two ways: the rank-aware FIM, and the hybrid that keeps its marginal scale and takes the correlation from the leave-one-out ensemble. Both are now built on every run. The leave-one-out ensemble, the forward sensitivities and the conformal bands are shared, so the second variety is one more quadratic form on a matrix already in hand. The result carries a UqBands per variety, and the output file writes Q_low_<v>, Q_up_<v>, CovP_<v> and StdY_<v> for <v> in fim and hybrid. plot.py reads that and the bare Q_low/Q_up of the reference dumps, and draws the hybrid band dashed over the FIM one on hidden states alone, since a conformal band has no covariance in it. Each example now has a single cuqdyn.xml. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HYfR3Uw7zZhBk9oNQT45oh
ZocoLini
force-pushed
the
refactor/always-all-bands
branch
from
September 8, 2026 16:18
f052131 to
5409daf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The hidden states took their covariance one of two ways, picked with
<uq_method>: the rank-aware FIM of CUQDyn1_Plus, or the hybrid that keeps the FIM marginal scale and takes its correlation from the leave-one-out ensemble. Choosing meant knowing in advance which one to trust, and comparing them meant a second full run.Both are now built on every run. The expensive parts -- the leave-one-out ensemble, the forward sensitivities, the conformal bands -- are shared, so the second variety is one more quadratic form on a matrix that already exists. It does not cost enough to be worth a setting.
The result carries a UqBands per variety instead of one loose pair plus the
q_low_alt/q_up_altthat used to appear only when the hybrid was selected, and the output file writesQ_low_<v>,Q_up_<v>,CovP_<v>andStdY_<v>forvin fim and hybrid. There is no bareQ_low/Q_upleft: with no variety to select, no pair deserves the unqualified name. plot.py reads both shapes, so the CUQDyn1 reference dumps under example-results/ still plot, and it draws the hybrid band dashed over the FIM one on hidden states alone -- elsewhere the two coincide, since a conformal band has no covariance in it.uq_methodis gone from the XML schema, from CuqdynConf and from its Rust mirror, and the per-examplecuqdyn-fim.xml/cuqdyn-hybridcov.xmlpair collapses into onecuqdyn.xml.