-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: custom modifiers #1188
feat: custom modifiers #1188
Conversation
950f1b5
to
d85503b
Compare
A big question for solving #850 is what kind of language to use to specify custom expressions. I think for many use cases the expressions are simple enough that the language does not matter much. And it might be possible to add the language to the workspace in such a way that in the future new languages could be added? |
yeah I think we need to solve 2 issues:
a big question is also in what order these modifications happen, i.e. here we have the custom modifier an additive modifier where the total rate in pyhf is computed as
but you could also imagine expressions that expect to operate on yields onec all other modifiers have been applied |
I think this is technically still in the scope of normal HistFactory https://root.cern/doc/v620/classRooStats_1_1HistFactory_1_1Measurement.html#ade80531b4588d22ad5e7339ce74e7027. The version implemented there just acts as a normfactor, so this question of order is avoided. Once you allow more custom variations the problem becomes more complicated indeed. |
ea2d39a
to
30c4d26
Compare
this now supports declaring additional parameters in the modifiers.. here e.g. a mean of the gaussian
|
545693d
to
763c3a1
Compare
8379a3e
to
11abd9a
Compare
9dd6470
to
81a8734
Compare
fa514ba
to
139b3fd
Compare
8889ffd
to
a4b911b
Compare
126154a
to
de5b610
Compare
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
It looks like it's been quite some time since any progress was made here. It's been bumped back for a few releases, is there some technical limitation, or has it just not been prioritized? There are some analysis use cases this could be really helpful for, and we've been having to use some really inefficient work-arounds instead. Is there a way we could help? |
Hi, I tried running the simple example with the "gaussian" bump on top of a simple mode. The branch was installed as
I suspect that the way the Thank you for your help and time. Cheers, |
011b5fe
to
d7d9ce0
Compare
tests pass (2 tiny floating point changes... ) will clean up tomorrow |
I don't really understand the CI failures - passes on my machine - any clues @matthewfeickert ? |
7cacc62
to
1b6d628
Compare
[pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci string-based constraints and more dedubpe in builders pyflakes [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
f125fdf
to
14a3c68
Compare
closed in favor of #1625 |
Description
This is a first example on how to e.g. have a "gaussian" bump on top of a simple model
this gives a first look into how to solve #850
cc @alexander-held