Tools to solve difficult numerical optimization problems.
Project description
optimagic
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file optimagic-0.5.0rc1.tar.gz
.
File metadata
- Download URL: optimagic-0.5.0rc1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19e22ddbe56884d1b23ced0ac6b86828823707de3663fd452b506bb68bc86e9b |
|
MD5 | 0d931e518bde8cf7babcdf206b8b82df |
|
BLAKE2b-256 | c2f05fb7030c3c290a7a6ec8dce1b1c69e62524412435b3d6a2e3f5d5e690fd9 |
File details
Details for the file optimagic-0.5.0rc1-py3-none-any.whl
.
File metadata
- Download URL: optimagic-0.5.0rc1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9883c630f26eab04f084d430777bd175e6190c4f1855b5bdc7f7a3f306de291 |
|
MD5 | 249c9220a07274e2f98f32ee6766e415 |
|
BLAKE2b-256 | c8dabf3b0fd8e7b71fe9a967a332ef0af9e7c8021a125ba12fc29e92a602198b |