Unexpted message "lower/upper bounds outside current parameter value" while fitting

I’m using ROOT to do a fit of a set of data. Here is part of the code, I’m interested only in parameter p2.

[code] TF1 *poli = new TF1(“poli”,"[0]*pow(x +[1],[2])");

      poli->SetParameter(0,pow(10,-5));
      
      poli->SetParLimits(1,0,40);

      //here I set the limitations on p2

      poli->SetParLimits(2,0,5);[/code]

Here is what I get:

FCN=2.89262 FROM HESSE STATUS=OK 16 CALLS 1040 TOTAL EDM=1.34529e-006 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 p0 2.03368e-007 1.02832e-006 2.53008e-012 -4.70596e+004 2 p1 1.59590e+001 1.39138e+001 9.10084e-006 -4.99862e-003 3 p2 4.55035e+000 8.79071e-001 2.01413e-006 6.85378e-002
As soon as I change the lower limit of p2 from 0 to, say, 0.1 I get the following message

But I do not get the average of bounds as parameter, infact using the code

[code] TF1 *poli = new TF1(“poli”,"[0]*pow(x +[1],[2])");

      poli->SetParameter(0,pow(10,-5));
      
      poli->SetParLimits(1,0,40);

      poli->SetParLimits(2,0.1,5);[/code]

I get

Info in ROOT::Math::ParameterSettings>: lower/upper bounds outside current parameter value. The value will be set to (low+up)/2 FCN=2.89262 FROM HESSE STATUS=OK 16 CALLS 1417 TOTAL EDM=1.53131e-006 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 p0 2.03752e-007 8.57169e-007 2.53901e-012 -9.85269e+004 2 p1 1.59520e+001 1.20555e+001 9.10243e-006 2.44835e-002 3 p2 4.55001e+000 7.47467e-001 2.03566e-006 -1.25375e-001
So is that message only an information in the case the parameter actually is outside the bounds or does it affect the fit in any case?

I also tried to make the interval of the parameter p2 smaller.

[code] TF1 *poli = new TF1(“poli”,"[0]*pow(x +[1],[2])");

  poli->SetParameter(0,pow(10,-5));
  
  poli->SetParLimits(1,0,40);

  poli->SetParLimits(2,4.4,4.7);[/code]

I get the same message, but still the same value of p2 (again, not the average of bounds), with a much smaller error

Info in ROOT::Math::ParameterSettings>: lower/upper bounds outside current parameter value. The value will be set to (low+up)/2 FCN=2.89262 FROM HESSE STATUS=OK 16 CALLS 561 TOTAL EDM=4.03953e-007 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 p0 2.03088e-007 9.02842e-007 2.52483e-012 -3.95221e+004 2 p1 1.59623e+001 1.25989e+001 9.10080e-006 -6.73189e-003 3 p2 4.55062e+000 2.53230e-001 1.48882e-005 -7.31641e-003

So is this last fit as valid as the first one, even though I receive that message?

1 Like

Hi,

The message refers to the initial value of the parameter p2. You did not set any value so by default 0 will be used which is outside your interval. You should try to set a reasonable initial value

Lorenzo

4 Likes

That’s a great explanation… the issue is that this is not obvious at all from the reference manual imho. (I mean the setting being a prerequisite for limits.)

Thank you for your feedback. I have added a note in the reference documentation

Cheers, Lorenzo