Open andrzejnovak opened 2 years ago
Thanks for raising this! Unconstrained parameters do not fit very well into this plot. I like the idea of just showing the best-fit value and uncertainty as text, alternatively we could filter out such parameters automatically. Currently this can be done manually via the exclude
kwarg, but that is tedious.
Once conceptual difficulty is that the function currently does not have access to the information about which parameter is unconstrained. We could either add that to the FitResults
container (might be convenient to have for other purposes as well), or hand over the model (or just the relevant piece of information) in the pulls()
function call.
Another thing to consider would be staterror
parameters, they do not fit particularly well here either since they have a different central value and varying constraint term widths.
Hah indeed, I was using exclude
for staterror
, but still wanted an easy way to "see" the interesting params. Indeed adding rgx/wildcards parsing to exclude
would be one improvement and maybe exclude_by_type
to do so by type (perhaps defaulting to ['staterror', 'normfactor']
There currently is a hardcoded exclusion for parameters called staterror_*
:
https://github.com/scikit-hep/cabinetry/blob/fce72088b4a6345304bf8c2e489938d41087a253/src/cabinetry/visualize/__init__.py#L482-L483
which is not very elegant and will fail if users call them differently (which they are free to do).
I think it would be great to do both, as you suggest:
FitResults
),We're currently using fnmatch
to support wildcards in other places such as https://github.com/scikit-hep/cabinetry/blob/fce72088b4a6345304bf8c2e489938d41087a253/src/cabinetry/route.py#L180 which probably has a lower barrier to entry but is also less powerful than regex. Either could work here I think.
Hi, just stumbled across this issue. I have an implementation for the exclusion by parameter type in my fork of cabinetry. If this is still of interest, I could open a PR?
Edit: Ah, nevermind, I see it being discussed in #342 already.
.visualize.pulls
Should only show the value (maybe just numeric) for unconstrained params