You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm trying to use pyminuit to minimise a Chi^2 function, and obtain errors on
the parameters.
How do I set the "up" parameter?
do I just set it in my initial minuit object?
minbk = minuit.Minuit(x2_bk_param, tmpalphabk = 0.5, tmpvubbk = 0.0009,
err_tmpalphabk = 0.01, err_tmpvubbk = 0.00001, up = 1)
Have read through the documentation, but can't find an explicit description of
how to set the parameter.
Many Thanks,
Geoff
Original issue reported on code.google.com by Geoff.He...@gmail.com on 18 Feb 2011 at 10:52
The text was updated successfully, but these errors were encountered:
Parameters of the minimizer are set as member data, like this:
>>> import minuit
>>> m = minuit.Minuit(lambda x: x**2)
>>> m.up = 1.
Keyword arguments in the constructor are interpreted as parameters of the
objective function. At some point, I'll look over the documentation and try to
make that more clear.
By the way, up == 1. is the default, so you don't need to set it (chi^2
minimization is by far the most common use-case).
You can see what it does like this:
>>> m = minuit.Minuit(lambda x: x**2)
>>> m.values
{'x': 0.0}
>>> m.up
1.0
>>> m.hesse() # calculate the error matrix at this point (x == 0.)
>>> m.errors
{'x': 1.0}
>>> m.up = 4.
>>> m.hesse()
>>> m.errors
{'x': 2.0}
-- Jim
Original comment by jpivar...@gmail.com on 18 Feb 2011 at 9:50
Original issue reported on code.google.com by
Geoff.He...@gmail.com
on 18 Feb 2011 at 10:52The text was updated successfully, but these errors were encountered: