Stepsize during minimization

Hi everyone

I am trying to fit an histogram using root. I have a function, (gaussian like) which I want to use to fit a certain histogram with some data. I have defined a parameter, which is called onset, that basically control where the function starts ( x < onset the function is zero).
I have some issues with fitting with this onset parameter because I observe that the step-size is to small.

To explain better, the derivative of this function with respect to this parameter is zero inside a bin width, only when the onset exceed a bin edge there is some variation.

(bin width is 5 arb. units)

I have tried to set the parameters with

minuit.DefineParameter(1, "onset",    func.GetParameter(1), 5.0, 20.0, 100.0)  # Step size impostata a 5.0

But this does not solve the problem

_ROOT Version: ROOT 6.30/04
_Platform: WSL

I think I might have a solution, that is brutal but at the same time could be really effective.

It is possible to impose a discrete set of parameter, like {10, 20, 30 , 40, 50} and perform a fit with this condition?

Hi Adriano,

I apologise for not addressing your inquiry earlier, I think we were tricked by the second message you posted after the first one, thinking it was an answer.

I am not sure Minuit allows that, asking @jonas to be sure, but why do you need to vary the interval in which the function is defined? Somehow it should be known when your model starts to describe your data (please forgive me if I am naive hereā€¦)

Cheers,
D

So it seems that you want to override/define your own gradient function.

Have a look at this discussion

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