-
Couldn't load subscription status.
- Fork 63
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Current Behaviour
When I use padding in my fits, I got one that looks really bad.
I would expect a much better fit
import json
import zfit
import matplotlib.pyplot as plt
import pandas as pnd
from dmu.stats.zfit_plotter import ZFitPlotter
with open('data.json') as ifile:
data = json.load(ifile)
df = pnd.DataFrame(data, columns=['mass'])
array = df['mass'].to_numpy()
obs = zfit.Space('x', limits=(5000, 6000))
data= zfit.data.from_numpy(array=array, obs=obs)
#pdf = zfit.pdf.KDE1DimISJ(data=array, obs=obs, padding={'lowermirror' : 0.8, 'uppermirror' : 0.8})
#pdf = zfit.pdf.KDE1DimISJ(data=array, obs=obs, padding={'lowermirror' : 0.1, 'uppermirror' : 0.1})
pdf = zfit.pdf.KDE1DimISJ(data=array, obs=obs, padding={'lowermirror' : 0.1})
#pdf = zfit.pdf.KDE1DimISJ(data=array, obs=obs)
ptr = ZFitPlotter(data=array, model=pdf)
ptr.plot()
plt.show()When the lines with padding are used I see:
In order to reproduce this you will need the file with data I attached.
Expected Behaviour
Without the padding I see:
from the documentation, the default padding is 0.1. Even with 0.1 I see bad fits.
Context (Environment)
- zfit version: 0.26.0, but also with older versions
- Python version: 3.12
- Are you using conda, pipenv, etc? : Micromamba
- Operating System: AlmaLinux9
- Tensorflow version: 2.16.2
Possible Solution/Implementation
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working