Repository navigation
Handle zero model variance in ASY template likelihood - #1231
Open
dhairyajangir wants to merge 1 commit into
Open
dhairyajangir wants to merge 1 commit into
dhairyajangir wants to merge 1 commit into
Conversation
dhairyajangir
marked this pull request as ready for review
November 10, 2026 07:40
henryiii
force-pushed
the
fix/asy-zero-variance
branch
from
November 13, 2026 22:49
6f4e20b to
199aadf
Compare
This branch has not been deployed
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.
Addresses item 14 in #1192.
A parametric component contributes no template variance. With
method="asy", adding a tiny positive floor causes cancellation in the gamma terms. In a three-bin example, different predictions return the same cost and a large prediction returns NaN. MIGRAD then leaves the starting amplitude unchanged.Use the Poisson likelihood for bins with zero model variance and the existing ASY formula for positive variance. Keep the current variance floor for the profiled methods.
The pure-model regression matches the Poisson cost and recovers the expected fitted amplitude. The mixed-model regression matches an independent sum of Poisson and negative-binomial terms. Both fail on unchanged source. All 196 cost tests and pinned Ruff checks passed locally.
Codex helped reproduce the issue, prepare the patch, and run the checks.
Could a maintainer authorize the Test workflow when convenient?