Skip to main content

Tools to solve difficult numerical optimization problems.

Project description

estimagic

image image image image image image image image image image image image

Introduction

estimagic is a Python package for nonlinear optimization with or without constraints. It is particularly suited to solve difficult nonlinear estimation problems. On top, it provides functionality to perform statistical inference on estimated parameters.

Optimization

  • estimagic wraps algorithms from scipy.optimize, nlopt, pygmo and more.
  • estimagic implements constraints efficiently via reparametrization, so you can solve constrained problems with any optimzer that supports bounds.
  • The parameters of an optimization problem can be arbitrary pytrees
  • The complete history of parameters and function evaluations can be saved in a database for maximum reproducibility.
  • Painless and efficient multistart optimization.
  • The progress of the optimization is displayed in real time via an interactive dashboard.

Estimation and Inference

  • You can estimate a model using method of simulated moments (MSM), calculate standard errors and do sensitivity analysis with just one function call.
  • Asymptotic standard errors for maximum likelihood estimation.
  • estimagic also provides bootstrap confidence intervals and standard errors. Of course the bootstrap procedures are parallelized.

Numerical differentiation

  • estimagic can calculate precise numerical derivatives using Richardson extrapolations.
  • Function evaluations needed for numerical derivatives can be done in parallel with pre-implemented or user provided batch evaluators.

Installation

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

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

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

Installing optional dependencies

Only scipy is a mandatory dependency of estimagic. 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)

Documentation

The documentation is hosted (on rtd)

Citation

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

@Unpublished{Gabler2022,
  Title  = {A Python Tool for the Estimation of large scale scientific models.},
  Author = {Janos Gabler},
  Year   = {2022},
  Url    = {https://github.com/OpenSourceEconomics/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

estimagic-0.4.4.tar.gz (347.3 kB view details)

Uploaded Source

Built Distribution

estimagic-0.4.4-py3-none-any.whl (400.0 kB view details)

Uploaded Python 3

File details

Details for the file estimagic-0.4.4.tar.gz.

File metadata

  • Download URL: estimagic-0.4.4.tar.gz
  • Upload date:
  • Size: 347.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for estimagic-0.4.4.tar.gz
Algorithm Hash digest
SHA256 10a2976c433ce51f934b9638a7f779563bc0f068bdf9c5823dac9a4c6a731592
MD5 e33788ec5282914ff52e77e03f3fcffc
BLAKE2b-256 8ebd37d1ced659cb49243aece4141d94a1ccb69da38aeab9a930b4c80e91f719

See more details on using hashes here.

File details

Details for the file estimagic-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: estimagic-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 400.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for estimagic-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8bc35a998e5a2582ef924a24f27974ad3ef2034715518059303355c1fd34df0b
MD5 a4b72fe6d5b6020a3b2a3c7b7bc821bf
BLAKE2b-256 891037038bc36f50ccae9ce5dec726bc9387046811017dd95df17f9cbb7609d5

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