Skip to content
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

Uncertainties on pulls #1301

Closed
annmwang opened this issue Feb 9, 2021 · 5 comments
Closed

Uncertainties on pulls #1301

annmwang opened this issue Feb 9, 2021 · 5 comments
Labels
question Further information is requested

Comments

@annmwang
Copy link

annmwang commented Feb 9, 2021

Question

Is there a way to get the uncertainties on the pulls? I followed the example here:

https://github.com/scikit-hep/pyhf/blob/master/docs/examples/notebooks/pullplot.ipynb

but I think the option "return_uncertainties" is no longer accepted for the function pyhf.infer.mle.fit. I get the error

pyhf.exceptions.Unsupported: Unsupported options were passed in: ['return_uncertainties'].

I'm using pyhf version 0.5.4 and the numpy/scipy backend/optimizer.

Thanks so much!

Relevant Issues and Pull Requests

I found the notebook through: #630

@kratsg
Copy link
Contributor

kratsg commented Feb 9, 2021

Use the minuit optimizer

pyhf.set_backend('numpy', 'minuit')

which returns uncertainties. You'll see in the notebook that this uses the minuit optimizer

    pyhf.set_backend("numpy", pyhf.optimize.minuit_optimizer(verbose=True))

@kratsg kratsg added the question Further information is requested label Feb 9, 2021
@annmwang
Copy link
Author

annmwang commented Feb 9, 2021

ah ok, thanks for the quick answer!

so there's no way to do this with the scipy optimizer?

@matthewfeickert
Copy link
Member

matthewfeickert commented Feb 9, 2021

so there's no way to do this with the scipy optimizer?

Correct. In HEP we have a goal of ascribing uncertainties to our minimizations, but this is not a shared universal goal in the task of minimization (c.f. this Twitter thread where @betatim first explained this to me). As as result, please use minuit in these circumstances.

@annmwang I'm going to close this Issue now, but please feel free to respond here if you have more questions. We're happy to try to address them.

@matthewfeickert
Copy link
Member

matthewfeickert commented Feb 9, 2021

@annmwang Also maybe of interest to you, in pyhf v0.6.0 you'll have access to iminuit's correlations matrix thanks to @kratsg in PR #988.

@annmwang
Copy link
Author

annmwang commented Feb 9, 2021

Interesting... thanks for the help- I will switch to minuit then. Thanks for the pointer to the correlations matrix too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants