Skip to content

Call limit reached in hypotest fucntion #1832

Answered by kratsg
ssaha1234 asked this question in Q&A
Discussion options

You must be logged in to vote

Here's a working example of what you intended to do. Note that a hypotest call will instantiate multiple optimizers (because it's not a single fit, but at least 5 separate fits using the specified optimizer).

import pyhf

new_optimizer = pyhf.optimize.scipy_optimizer(maxiter=1000000)
pyhf.set_backend(pyhf.tensorlib, new_optimizer)

model = pyhf.simplemodels.uncorrelated_background([5], [10], [2.5])
data = [15] + model.config.auxdata
test_mu = 1.0

result = pyhf.infer.hypotest(
    test_mu, data, model, return_expected_set=True, return_tail_probs=True,
)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ssaha1234
Comment options

@ssaha1234
Comment options

Answer selected by kratsg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants