Skip to content

Doing a Background only fit #1794

Answered by kratsg
ssaha1234 asked this question in Q&A
Mar 1, 2022 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

I have an input json file, with both signal and background values, and I would like to perform two fits on it, one is background only, the other is signal + background fit. I am doing an mle fit as shown in this gist - https://gist.github.com/ssaha1234/0f49934a0806a85a261d7e61e97e8a53

Typically, there's two different kinds of fits one wants to do. One is an MLE fit (unconstrained) and the other is a POI-constrained fit. Usually when someone wants to do an MLE fit for two different models, the way it works is to do something like

# ...
model = ws.model()

# bkg-only fit
pars_bonly = pyhf.infer.mle.fixed_poi_fit(0.0, ws.data(model), model)

# sig+bkg fit
pars_sigpbkg = pyhf.infer.mle.fixe…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@alexander-held
Comment options

@ssaha1234
Comment options

@alexander-held
Comment options

@ssaha1234
Comment options

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