SpeysideHEP / spey

Smooth inference for reinterpretation studies
https://spey.readthedocs.io
MIT License
7 stars 1 forks source link

Loss in numeric stability #8

Closed jackaraz closed 1 year ago

jackaraz commented 1 year ago

System Settings

Describe the bug

When $q\mu$ and/pr $q{\mu,A}$ are below $10^{-6}$ program becomes unstable and values become negative. This originates due to the ratio between $\mathcal{L}(\mu, \theta{\mu})$ and $\mathcal{L}(\hat\mu, \theta{\hat\mu})$ where sometimes $\mathcal{L}(\mu, \theta{\mu}) < \mathcal{L}(\hat\mu, \theta{\hat\mu})$ which should not happen.

To Reproduce

qmu=-3.055520068073747e-07, qmuA=-3.055520068073747e-07: poi=6.9806260135461145, muhat=0.9903130067730574, min_nll=46.82248569018225, muhatA=0.9903130067730574, min_nllA=46.82248569018225, logpdf(mu)=-46.822485537406244, logpdfA(mu)=-46.822485537406244

Expected behaviour

No response

Additional information

No response