Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
5 contributors

Users who have contributed to this file

@HDembinski @piti118 @cdeil @energynumbers @fabianrost84
51 lines (38 sloc) 1.84 KB

iminuit

https://travis-ci.org/scikit-hep/iminuit.svg?branch=develop https://ci.appveyor.com/api/projects/status/g6vymxvu9ax34e7l?svg=true Documentation Status https://dev.azure.com/scikit-hep/iMinuit/_apis/build/status/scikit-hep.iminuit?branchName=master

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}
You can’t perform that action at this time.