Skip to content

rogovsky/iminuit

 
 

Repository files navigation

iminuit

image

image

image

image

Documentation Status

iminuit is a Python interface to the MINUIT2 C++ package.

It can be used as a general robust function minimization method, but is most commonly used for likelihood fits of models to data, and to get model parameter error estimates from likelihood profile analysis.

In a nutshell

from iminuit import Minuit

def f(x, y, z):
    return (x - 2) ** 2 + (y - 3) ** 2 + (z - 4) ** 2

m = Minuit(f)

m.migrad()  # run optimiser
print(m.values)  # {'x': 2,'y': 3,'z': 4}

m.hesse()   # run covariance estimator
print(m.errors)  # {'x': 1,'y': 1,'z': 1}

About

MINUIT from Python - Fitting like a boss

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 48.8%
  • Jupyter Notebook 34.2%
  • Python 16.3%
  • Other 0.7%