Replies: 1 comment
-
So I did fix the issue, so here is the solution for the next people. It seems that iMinuit normalises histograms internally, which leads to a different value for the scale parameter. To correct for it, just divide your scale by (number of bins)/(physical range), which will give you the correct distribution. 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I am working on some project that require fitting curves, but I am stuck since yesterday one something surely very simple and I cannot find the mistake. I made a simpler version of the code to help.
Let's say that I have some binned data that should follow a scaled gaussian distribution. I therefore want to use the ExtendedBinnedNNL cost function for it. I followed the iMinuit tutorials but when I fit the parameters, my scale factor is completely off.
So the first plot we obtain comes from the visulalize of iminuit. The fit seems to fit well the data, so the fit is a success on iMinuit's side.
Now, the second plot shows the distribution of the data and the gaussian fit with the parameters obtained via iMinuit. For some reason, the two distributions do not match. The fit is scaled up a lot.
But the last figure shows that the cummulative of the data and the cdf parameters match.
Do you have any idea of what am I understanding wrong in my fit ? Thank you very much for your help!
Beta Was this translation helpful? Give feedback.
All reactions