estimagic

A Python package for nonlinear optimization with or without constraints.

About

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.

Estimagic grew out of my frustration with existing tools. Some notable features are:

  • Algorithms: Estimagic wraps algorithms from scipy, Nlopt, Pygmo, TAO, and many more.
  • Flexible Parameter Format: Parameters to optimize over can be specified in many formats, including (nested) dictionaries, NamedTuples, pandas Series or DataFrames, numpy arrays, scalars and mixes thereof. This is inspired by JAX’s pytrees and implemented in pybaum
  • Dagnostics: It is effortless to create plots of the criterion and parameter history. Or to watch them in a real-time dashboard.
  • Logging: The progress can be logged in an sqlite database. No information is lost if the optimization is aborted or crashes.
  • Constraints: Estimagic can reparametrize many constrained problems such that they can be solved with any optimizer.

Documentation

In Depth Tutorial