--- id: iminuit version: "2.32.0" license: MIT+LGPL license_treatment: copyleft maintenance: active --- # iminuit — Jupyter-friendly Python frontend for MINUIT2 in C++ License: copyleft · Maintenance: active · Downloads: 226.9K/mo ## What it is and what it does iminuit wraps MINUIT2, CERN's C++ optimization library, to solve parameter estimation problems in statistics and physics. It is designed for fitting statistical models—finding best-fit parameters and computing error estimates via likelihood profile analysis. The package includes built-in cost functions for common tasks (unbinned and binned maximum-likelihood, least-squares, template fits with error propagation) and can combine multiple cost functions additively. It integrates with Jupyter for interactive fitting and visualization. The package depends only on numpy at runtime but gains optional features from scipy (Minos intervals), numba (JIT compilation for speed), matplotlib (visualization), and ipywidgets (interactive mode). It supports current Python versions on macOS, Linux, and Windows, and has been actively maintained since 2012 with no known security vulnerabilities. Use it for: - Fit a probability density function to unbinned data and extract maximum-likelihood parameter estimates with error bars - Perform least-squares fitting to binned histograms with optional robustness to outliers - Combine multiple cost functions (e.g., signal + background models) and optimize jointly - Compute confidence intervals via Minos profile analysis for arbitrary confidence levels (with scipy) - Accelerate likelihood evaluation using Numba-compiled probability functions for high-dimensional data ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. iminuit is a Python interface to MINUIT2 (CERN's C++ optimization library) for fitting statistical models via maximum-likelihood and least-squares methods, with built-in cost functions and Jupyter visualization. Yes, if you need parameter estimation with rigorous error analysis. iminuit is production-stable, actively maintained, has no known vulnerabilities, and is the standard Python interface to MINUIT2. The dual MIT/LGPL license requires review for proprietary use. Medium install friction (compiled wheels) is typical for scientific packages and not a barrier on supported platforms. ## Install pip install iminuit uv add iminuit poetry add iminuit ## Installing iminuit Before you install: Medium install friction due to compiled C++ extensions, but wheels are available for Python 3.9+ on macOS, Linux, and Windows. The package is actively maintained with recent commits and has been stable since its 2012 release. License in practice: Dual-licensed under MIT and LGPL (copyleft treatment). Users must comply with LGPL obligations if distributing modifications, or may choose MIT terms for simpler use cases; review the license terms for your deployment model. Quickstart: pip install iminuit numpy from iminuit import Minuit from iminuit.cost import UnbinnedNLL import numpy as np cost = UnbinnedNLL(data, pdf_function) m = Minuit(cost, param1=initial_value) m.migrad() m.hesse() Requires Python 3.9+. Compiled C++ extensions are pre-built for common platforms; building from source requires a C++ compiler. Verify before relying: - Whether optional dependencies (numba, matplotlib, scipy, ipywidgets) are automatically detected and enabled at install time or require explicit installation - Performance characteristics when used with Numba-compiled functions compared to native MINUIT2 or other optimizers ## Package facts - License: MIT+LGPL (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 226.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags maximum likelihood fitting, least squares optimization, parameter estimation errors, statistical model fitting, minuit python interface, likelihood profile analysis, jupyter fitting visualization, statistical-fitting, parameter-estimation, jupyter-friendly [View on SkillFed](https://skillfed.io/packages/iminuit) · [View on PyPI](https://pypi.org/project/iminuit/)