refactor(cadecon): convergence UI improvements and kernel estimation groundwork#94
Merged
refactor(cadecon): convergence UI improvements and kernel estimation groundwork#94
Conversation
The iterative kernel solver was driving tau_rise toward 0 because sharper kernels reduce reconstruction error, even past the true rise time. The bi-exponential fit residual has a U-shape — it reaches a minimum at the correct kernel then increases as tau_rise overshoots. Track the best residual across iterations and early-stop (patience=3) when the residual rises consecutively. Finalization always uses the best-residual kernel parameters regardless of how the loop exits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Draw horizontal dashed lines at the true tau_rise and tau_decay values on the kernel iteration plot when "Show Ground Truth" is enabled. Uses the same pink/magenta color as the kernel shape overlay. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… tabs - Remove Row 3 (Alpha/PVE/Event Rate distributions + Subset Variance) - Add PVE and Event Rate tabs to the convergence panel (now 5 tabs: Kernel | Alpha | Threshold | PVE | Event Rate) - Fix ground truth overlay lines to use color-matched dashes (blue for tau_rise, red for tau_decay) instead of uniform pink - Remove unused distribution/drilldown CSS and imports from layout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… 1s decay) The iterative solver can only refine time constants downward — a too-fast kernel is compensated by extra spikes, so there is no error signal to push it slower. Starting conservatively slow ensures the optimizer passes through the optimum on the way down. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Iteration 0 contains placeholder values (alpha=1, threshold=0, pve=0, empty sCounts) before any computation runs. Filter it out by default in PerCellTrendsChart so Alpha, Threshold, PVE, and Event Rate tabs all start from iteration 1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Iteration 0 contains placeholder values before any computation runs. Filter it from all charts — Kernel convergence (tau lines, residual, subset scatter) and all per-cell trends (Alpha, Threshold, PVE, Event Rate) now start at iteration 1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a7ee284 to
39f64f7
Compare
Bump IQR fill opacity from 0.08 to 0.18 and Q-line opacity from 0.3 to 0.4. Show Q25/Q75 dashed boundary lines (previously hidden). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… iter 0 The iteration 0 filter caused the chart to initialize with empty data before iteration 1 completed, breaking uPlot rendering. Restore full convergenceHistory for the kernel chart (initial tau values are meaningful) and only null out the residual at iteration 0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…icks Defer rendering the kernel convergence chart until iteration 1 completes (avoids uPlot initializing with empty data). Filter iteration 0 from chart data since it's just initial params. Show only integer tick labels on the x-axis (Iteration) for all convergence tabs — suppresses fractional ticks like 1.5. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The kernel fit residual (bi-exponential shape mismatch) doesn't always produce a reliable stopping signal. Note that trace-reconstruction residual would be a more robust alternative. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Data-driven tabs in ConvergencePanel, extract drawHLine helper in KernelConvergence, remove redundant early-stop revert in iteration manager, fix PerCellTrendsChart Show guard, and correct stale CSS comment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
2/fs) to bi-exponential fitter grid search and golden-section refinement — prevents fitting rise times shorter than 2 samplesKnown issue
The rise time constant still tends to collapse toward faster values across iterations. The Nyquist floor prevents it from going below
2/fsbut doesn't fully solve the positive feedback loop. Addressing this properly likely requires either damped tau updates, peak-location anchoring, or a trace-reconstruction-based stopping criterion — deferred to a follow-up.Test plan
🤖 Generated with Claude Code