Skip to main content

Tools to solve difficult numerical optimization problems.

Project description

optimagic

PyPI - Version image image image image image image image image image 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/OpenSourceEconomics/optimagic}
}

Acknowledgements

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

Project details


Download files

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

Source Distribution

optimagic-0.5.0rc2.tar.gz (331.6 kB view details)

Uploaded Source

Built Distribution

optimagic-0.5.0rc2-py3-none-any.whl (386.4 kB view details)

Uploaded Python 3

File details

Details for the file optimagic-0.5.0rc2.tar.gz.

File metadata

  • Download URL: optimagic-0.5.0rc2.tar.gz
  • Upload date:
  • Size: 331.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for optimagic-0.5.0rc2.tar.gz
Algorithm Hash digest
SHA256 9c05c7b8b1a9718073650209f42ac7ef3b0b0e56621880b40e50a4228d5c9d12
MD5 5925de81e8f532a938cc88ec8d3da5d0
BLAKE2b-256 5ae17e85f2db647752f3c3297cd65293904734d44ddf6a2f5c7e7036c4cdcf04

See more details on using hashes here.

File details

Details for the file optimagic-0.5.0rc2-py3-none-any.whl.

File metadata

  • Download URL: optimagic-0.5.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 386.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for optimagic-0.5.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 259aa2b1d2f6179a1f7863e5e39a90d345f4a4fa6f22d74fe715cd359b80c14f
MD5 db44a9a929bda1fc576ad8f9ca5f6278
BLAKE2b-256 4757b72893d4a832787a6e4b3f41f3cb2f3ef9a0a677a923a71497ab792a6db6

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