Skip to content

Handle zero model variance in ASY template likelihood - #1231

Open
dhairyajangir wants to merge 1 commit into
scikit-hep:developfrom
dhairyajangir:fix/asy-zero-variance
Open

dhairyajangir wants to merge 1 commit into
scikit-hep:developfrom
dhairyajangir:fix/asy-zero-variance

Conversation

@dhairyajangir

@dhairyajangir dhairyajangir commented Nov 10, 2026 •

Copy link
Copy Markdown

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?

@dhairyajangir
dhairyajangir marked this pull request as ready for review November 10, 2026 07:40
@henryiii
henryiii force-pushed the fix/asy-zero-variance branch from 6f4e20b to 199aadf Compare November 13, 2026 22:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant