Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

How to combine datasets of different weights using zfit

I have two datasets. Dataset_1, each element of which has the same weight_1, and dataset_2, each element of which has the same weight_2. Weight_2 is larger than weight_1. As a note: I do not know the ...
Chris G's user avatar
1 vote
0 answers
56 views

Suspicious correlation matrix and errors after the fit of weighted data

I am using zfit to perform an extended unbinned maximum likelihood fit of a sWeighted data sample. In particular, I use zfit.miminize.Minuit. I am facing an issue that if I let yield parameters to get ...
Eldar Ganiev's user avatar
1 vote
1 answer
55 views

Problems creating a customized pdf; asymmetric gaussian

In order to create a customized pdf in zfit; Skew normal distribution (asymmetric gaussian), how can be called the error function? Seems that math.erf(x) and scipy.special.erf(x) do not works (they ...
Jordan C. Correa's user avatar
-1 votes
1 answer
30 views

zfit ConvPDF for small kernel uses a lot of memory

I'm using the zfit FFTConvPDFV1 object and experience that for a lot smaller kernel (space-) limits, the memory consumption rises extremely. In my case, I'm using a DoubleCB PDF with floating ...
Mayou36's user avatar
  • 4,815
0 votes
1 answer
58 views

How can I obtain sWeights with zfit?

I have a fit to the signal region using zfit and fitting with an ExtendedUnbinnedNLL. My models are a signal and a background PDF. How can I obtain the sWeights for background subtraction? I had a ...
Mayou36's user avatar
  • 4,815
1 vote
1 answer
83 views

Error estimation of maximum likelihood fit in zfit with weight

I am looking at the zfit tutorial, and seeing the comment about the likelihood with weight, (see attached image) does anyone know if how the uncertainty is estimated in this case. How would the ...
peilian's user avatar
  • 11
0 votes
1 answer
28 views

"TypeError: compute_integral() got multiple values for argument 'limits'" using register_analytic_integral

I defined my own ZFit pdf using something like: class AngularPDFWithAcceptance(zfit.pdf.BasePDF): def __init__(self, ctl_name, ctk_name, phi_name, params, name): from math import pi ...
Wouter Hulsbergen's user avatar
1 vote
1 answer
144 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) ...
gtateno's user avatar
  • 11
1 vote
1 answer
204 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 ...
lweid's user avatar
  • 13
1 vote
1 answer
162 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!
YMTheory's user avatar
2 votes
1 answer
271 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 ...
holyschmoly's user avatar
0 votes
1 answer
203 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....
Keita Mizukoshi's user avatar
2 votes
1 answer
124 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....
Xuelong's user avatar
  • 21
1 vote
1 answer
217 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([...
Marchela04's user avatar
2 votes
2 answers
403 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 ...
dhill89's user avatar
  • 61
1 vote
1 answer
241 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, ...
Horace's user avatar
  • 62
1 vote
1 answer
709 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 ...
SebastianJL's user avatar
1 vote
1 answer
53 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 ...
Colm  Murphy's user avatar
2 votes
1 answer
137 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....
serhiiC's user avatar
  • 23
2 votes
1 answer
134 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 ...
Dovahkinsl's user avatar
0 votes
1 answer
191 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 ...
Mayou36's user avatar
  • 4,815