Skip to content

optimagic is a Python package for numerical optimization. It is a unified interface to optimizers from SciPy, NlOpt and other packages. optimagic's minimize function works just like SciPy's, so you don't have to adjust your code. You simply get more optimizers for free. On top you get diagnostic tools, parallel numerical derivatives and more.

License

Notifications You must be signed in to change notification settings

optimagic-dev/optimagic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4a9ddcc · Apr 28, 2025
Nov 12, 2024
Apr 28, 2025
Apr 28, 2025
Apr 28, 2025
Apr 28, 2025
Jul 16, 2024
Apr 28, 2025
Feb 7, 2023
Feb 7, 2023
Nov 13, 2024
Aug 26, 2024
Jul 16, 2024
Oct 18, 2021
Aug 26, 2024
Aug 22, 2024
Apr 28, 2025
Apr 28, 2025

Repository files navigation

optimagic

PyPI - Version image image image image image image image image Ruff image image image image

Introduction

optimagic is a Python package for numerical optimization. It is a unified interface to optimizers from SciPy, NlOpt and many other Python packages.

optimagic's minimize function works just like SciPy's, so you don't have to adjust your code. You simply get more optimizers for free. On top you get powerful diagnostic tools, parallel numerical derivatives and more.

optimagic was formerly called estimagic, because it also provides functionality to perform statistical inference on estimated parameters. estimagic is now a subpackage of optimagic.

Documentation

The documentation is hosted at https://optimagic.readthedocs.io

Installation

The package can be installed via pip or conda. To do so, type the following commands in a terminal:

pip install optimagic

or

$ conda config --add channels conda-forge
$ conda install optimagic

The first line adds conda-forge to your conda channels. This is necessary for conda to find all dependencies of optimagic. The second line installs optimagic and its dependencies.

Installing optional dependencies

Only scipy is a mandatory dependency of optimagic. Other algorithms become available if you install more packages. We make this optional because most of the time you will use at least one additional package, but only very rarely will you need all of them.

For an overview of all optimizers and the packages you need to install to enable them see {ref}list_of_algorithms.

To enable all algorithms at once, do the following:

conda install nlopt

pip install Py-BOBYQA

pip install DFO-LS

conda install petsc4py (Not available on Windows)

conda install cyipopt

conda install pygmo

pip install fides>=0.7.4 (Make sure you have at least 0.7.1)

Citation

If you use optimagic for your research, please do not forget to cite it.

@Unpublished{Gabler2024,
  Title  = {optimagic: A library for nonlinear optimization},
  Author = {Janos Gabler},
  Year   = {2022},
  Url    = {https://github.com/optimagic-dev/optimagic}
}

Acknowledgements

We thank all institutions that have funded or supported optimagic (formerly estimagic)

About

optimagic is a Python package for numerical optimization. It is a unified interface to optimizers from SciPy, NlOpt and other packages. optimagic's minimize function works just like SciPy's, so you don't have to adjust your code. You simply get more optimizers for free. On top you get diagnostic tools, parallel numerical derivatives and more.

Topics

Resources

License

Code of conduct

Citation

Stars

Watchers

Forks

Packages

No packages published

Languages