So I am trying to use the good old Fit Panel to fit a times series data with an exponential distribution.
First of all, when I set the range using the slide bar at the bottom the limits on the graph do not show up anymore (as they used to). This was a very useful feature, and I do not understand why it was removed (or if its broken then needs to be fixed?).
But the bigger problem is the following If I select “expo” from the drop down menu it fits the data totally fine. See screenshot.
Yes, I can go and set the initial values close enough to the real thing, and the the fit works – however that is absurdly tedious, and essentially partially defeats the purpose of the fit!
Is there a workaround? I mean it’s 2020, it shouldn’t be so hard to do a quick fit, right? Especially for ROOT, right?
Areg
p.s. here’s the definition of the function I am using for fitting:
@Wile_E_Coyote, I do know this - and I have been doing this for years. I just wandered whether there are some functionalities in ROOT that will help one “guess” those initial values for an arbitrary function, just as there are similar “guesses” for such built-ins as Gaus etc. Again, it’s 2020, not 1970…most other codes (matlab, numpy etc) have this.
I don’t think that “smart guessing” can be coded for arbitrary fit functions.
Looking at the form of your function, I think you should make sure that the initial values of “p0” and especially “p2” are nonzero (e.g. try to set them to 1).