Skip to main content

Interactive Minimization Tools based on MINUIT

Project description

https://img.shields.io/pypi/v/iminuit.svg https://img.shields.io/pypi/dm/iminuit.svg

iminuit

Interactive IPython-Friendly Minimizer based on SEAL Minuit2. (A slightly modified version is included in the package no need to install it separately)

It is designed from ground up to be fast, interactive and cython friendly. iminuit extracts function signature very permissively starting from checking func_code down to last resort of parsing docstring(or you could tell iminuit to stop looking and take your answer). The interface is inspired heavily by PyMinuit and the status printout is inspired by ROOT Minuit. iminuit is mostly compatible with PyMinuit(with few exceptions). Existing PyMinuit code can be ported to iminuit by just changing the import statement.

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()
print(m.values)  # {'x': 2,'y': 3,'z': 4}
print(m.errors)  # {'x': 1,'y': 1,'z': 1}

Install

First install cython (pip install cython), then

python setup.py install

or from pip:

pip install iminuit

For Windows, Christoph Gohlke made a nice windows binary to save you all from Windows compilation nightmare:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#iminuit

Tutorial

All the tutorials are in tutorial directory. You can view it online too.

Documentation

http://iminuit.readthedocs.org/

Technical Stuff

Using it as a black box is a bad idea. Here are some fun reads; the order is given by the order I think you should read.

You can help

Github allows you to contribute to this project very easily just fork the repository, make changes and submit a pull request.

Here’s the list of concrete open issues and feature requests: https://github.com/iminuit/iminuit

More generally any contribution to the docs, tests and package itself is welcome!

  • Documentation. Tell us what’s missing, what’s incorrect or misleading.

  • Tests. If you have an example that shows a bug or problem, please file an issue!

  • Performance. If you are a C/cython/python hacker go ahead and make it faster.

Project details


Release history Release notifications | RSS feed

This version

1.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iminuit-1.2.tar.gz (931.6 kB view details)

Uploaded Source

File details

Details for the file iminuit-1.2.tar.gz.

File metadata

  • Download URL: iminuit-1.2.tar.gz
  • Upload date:
  • Size: 931.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for iminuit-1.2.tar.gz
Algorithm Hash digest
SHA256 7651105fc3f186cfb5742f075ffebcc5088bf7797d8ed124c00977eebe0d1c64
MD5 4701ec472cae42015e26251703e6e984
BLAKE2b-256 c9fd87931ec898e16557b8f6ae6e576743d00ca085c1cb4eb4673d8f4b02ac20

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page