Questions tagged [zfit]
14
questions
1
vote
1
answer
25
views
zfit hesse function error: "RuntimeWarning: Exception occurred, parameter values are not reset and in an arbitrary, last used state."
When playing with zfit tutorial, I just tried to remove the floating option of the alpha_sig parameter. In other words, I changed
alpha_sig = zfit.Parameter('alpha_sig', 200, 100, 400, floating=False)
...
1
vote
1
answer
43
views
Exclude/Ignore data region in polynomial fit (zfit)
I wanted to know if there's a way to exclude one or more data regions in a polynomial fit. Currently this doesn't seem to work as I would expect. Here a small example:
import numpy as np
import pandas ...
1
vote
1
answer
39
views
How can I convert a histogram (2D) into 2 pdf in zfit?
I am trying to do some 2d spectra fitting with the help of zfit.
The pdf I want to use comes from ROOT TH2D.
Is there any method to convert the input Th2D into a 2D pdf directly in zfit?
Thanks a lot!
1
vote
1
answer
87
views
Pull plot from toys in zFit
First of all I would like to say that I do have conceptual difficulties with this topic, so please correct me if my intention does not make sense.
I'm trying to validate the model that I use to ...
0
votes
1
answer
85
views
zfit straight line fitting for 2 dim dataset
I would like to fit 2-dim plot by straight line (a*x+b) using zfit like the following figure.
That is very easy work by a probfit package, but it has been deprecated by scikit-hep. https://nbviewer....
2
votes
1
answer
44
views
Import dataset from a ROOT file with cut using zfit
I am trying to perform a fit to a tree. But I need to add some cut to the branches which are not the observables of the fit.
Website https://zfit.readthedocs.io/en/latest/getting_started/intro/data....
1
vote
1
answer
80
views
PDF from a histogram in zfit?
I looking in the documentation how to obtain a PDF from a histogram, but I couldn't find anything, so how can I obtain PDF from a histogram ?, for example to use it in a sum_pdf = zfit.pdf.SumPDF([...
2
votes
2
answers
185
views
Use of data with negative weights in unbinned maximum likelihood fit in zfit
I am trying to perform an unbinned 3D angular fit in zfit, where the input data is a sample with per-event sWeights assigned from a separate invariant mass peak fit. I think I'm running into issues of ...
1
vote
1
answer
84
views
Constrain on parameters for Negative Log Likelihood Minimization
I am trying to fit a 5 parameter (a, b, c, d, e) model, where one of the parameters is constrained by another, let's say,
0< d < 1
e < |d|
I am currently using zfit which as far as I know, ...
1
vote
1
answer
414
views
Why is __future__.annotations (PEP 563) not backported to python3.6?
Does anyone know why PEP 563 is not backported to python36 as of the time of this writing? Are there any plans to do that or is it even possible?
I am asking because I could use it for the codebase of ...
1
vote
1
answer
27
views
Accessing PDF variables when registering analytic integral
Firstly, thank you for making a really neat, pythonic tool which can be used as an alternative for RooFit.
I have successfully defined a custom 2D PDF but I am not completely sure on how to register ...
2
votes
1
answer
90
views
Is there way to extend predefined polynomial pdf in zfit?
I'm trying to perform a fit with extended Chebyshev pdf. To do so I use predefined zfit.pdf.Chebyshev(). What do I miss here?
import tensorflow as tf
import zfit
from zfit import ztf
obs = zfit....
2
votes
1
answer
85
views
Multiple limits in fitting and toy generation in zfit
I have a running model with a pdf in zfit from where I want to generate toys from and after also fit the pdf to the toys. However I was wondering how to exclude certain areas in the toy generation as ...
0
votes
1
answer
76
views
How can I fix a parameter on creation in zfit?
I want to perform several fits with multiple parameters, some of the which are fixed in the first fit. How can I define a parameter that is not floating and how to change that? Creating without limits ...