pyhf icon indicating copy to clipboard operation
pyhf copied to clipboard

Support for unbound parameters

Open MoAly98 opened this issue 8 months ago • 4 comments

Summary

The MINUIT minimiser allows for unbound parameters, and the MINUIT guide even encourages the use of unbound parameters to avoid the non-linear, expensive parameter transformations done internally. Currently pyhf does not allow unbound parameters, but it shouldn't be difficult to support this by allowing users to pass a None or one sided parameters with (x, None) or (None, x) tuples.

This is related to the discussion in #2584.

Additional Information


Code of Conduct

  • [x] I agree to follow the Code of Conduct

MoAly98 avatar Apr 11 '25 09:04 MoAly98

HistFactory doesn't have support for unbounded parameters...? Can you check this in ROOT first?

kratsg avatar Apr 11 '25 09:04 kratsg

do we strictly need to be in-line with the ROOT HiFa for a fully pyhf-based analysis? if this is a question of interoperability then can we not fill the bounds with something really large when we are jumping from PyHF to HiFa?

MoAly98 avatar Apr 11 '25 12:04 MoAly98

do we strictly need to be in-line with the ROOT HiFa for a fully pyhf-based analysis? if this is a question of interoperability then can we not fill the bounds with something really large when we are jumping from PyHF to HiFa?

Try it out in ROOT first. To first order, it follows the HistFactory schema in v1.0 -- and something like this would be considered v2.0. You can set your own bounds as part of minimization manually if you'd like, nothing is blocking you from doing so (or even setting it as one-sided) in pyhf.

kratsg avatar Apr 11 '25 14:04 kratsg

I'd not view the bounds as a HistFactory feature but rather an implementation detail in ROOT. The xmls do not require bound specification and https://cds.cern.ch/record/1456844/ mentions the following:

Technically, RooFit’s PDF classes (RooGaussian in this case) make sure that the PDF is normalized to unity within the range of the observable (in this case $a_p$). So the technical implementation will actually correspond to a truncated and renormalized Gaussian (the default range for $a_p$ is $[−5, 5]$).

I personally like the idea of supporting complete or partial removal of the bounds for minimization.

alexander-held avatar Jun 04 '25 12:06 alexander-held