FIT error underflow - pyroot


Hi all,
I am currently having a problem, I am fitting a scatterplot with a second degree polinomial (written as [0]x(1+[1]*x) in order to have the second degree parameter in percentage). The problem is that the points are fairly precise and when I perform the fit it gives the right values of the parameters but the error on the parameters are of order 10^7 (basically 7 to 10 orders of magnitude bigger than the correct values). This error disappears if I multiply the incoming data with 10^6 in order to make the numbers bigger and then divide by this factor again.
Basically it looks like some kind of “underflow” error.
Worth mentioning is that I am performing the fit via pyroot using the standard fitting procedure of declaring the graph, the function and then call the Fit() method of the graph.
Is there any way I can fix this issue without doing this ugly multiplication? Is it a known issue in general?
Thank you,
Giorgio

_ROOT Version: 6.22
_Platform: linux


Instead of a TGraph use a TGraphErrors (and set appropriate “errors” for your data points).

Hi,
I am already using the TGraphErrors class. Could it be due to the fact that the “x” coordinates of my points are exact so I initialize them in the TGraphErrors class with error 0 ? But this should also happen when I multiply because I only do that on the y coordinates.

Do not give any “x errors” (i.e., use “ex = nullptr”).
Set proper “y errors” only.

I tried but doesn’t fix the situation. Seems to be dependent only on the y-coordinates

I guess we need a “reproducer” to try it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.