optimagic

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.

https://github.com/optimagic-dev/optimagic

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.6%) to scientific vocabulary

Keywords

numerical-differentiation numerical-optimization parallel-computing python
Last synced: 6 months ago · JSON representation

Repository

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.

Basic Info
Statistics
  • Stars: 303
  • Watchers: 7
  • Forks: 45
  • Open Issues: 48
  • Releases: 30
Topics
numerical-differentiation numerical-optimization parallel-computing python
Created about 7 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Code of conduct Citation

README.md

optimagic

PyPI - Version image image image image image image image image Ruff 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:

bash pip install optimagic

or

bash $ 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)

Owner

  • Name: optimagic
  • Login: optimagic-dev
  • Kind: organization
  • Email: janos.gabler@gmail.com

GitHub Organization for optimagic and associated repositories.

GitHub Events

Total
  • Create event: 26
  • Release event: 1
  • Issues event: 45
  • Watch event: 41
  • Delete event: 27
  • Member event: 2
  • Issue comment event: 254
  • Push event: 172
  • Pull request review comment event: 181
  • Pull request review event: 195
  • Pull request event: 95
  • Fork event: 19
Last Year
  • Create event: 26
  • Release event: 1
  • Issues event: 45
  • Watch event: 41
  • Delete event: 27
  • Member event: 2
  • Issue comment event: 254
  • Push event: 172
  • Pull request review comment event: 181
  • Pull request review event: 195
  • Pull request event: 95
  • Fork event: 19

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 32
  • Total pull requests: 64
  • Average time to close issues: 4 months
  • Average time to close pull requests: 23 days
  • Total issue authors: 11
  • Total pull request authors: 18
  • Average comments per issue: 1.38
  • Average comments per pull request: 2.06
  • Merged pull requests: 38
  • Bot issues: 1
  • Bot pull requests: 7
Past Year
  • Issues: 30
  • Pull requests: 60
  • Average time to close issues: 23 days
  • Average time to close pull requests: 18 days
  • Issue authors: 11
  • Pull request authors: 17
  • Average comments per issue: 1.3
  • Average comments per pull request: 1.98
  • Merged pull requests: 35
  • Bot issues: 1
  • Bot pull requests: 6
Top Authors
Issue Authors
  • janosg (17)
  • hamogu (3)
  • timmens (2)
  • spline2hg (2)
  • TimBerti (2)
  • buddejul (1)
  • Mv77 (1)
  • hmgaudecker (1)
  • ChristianZimpelmann (1)
  • linjing-lab (1)
  • pre-commit-ci[bot] (1)
Pull Request Authors
  • timmens (14)
  • spline2hg (8)
  • pre-commit-ci[bot] (7)
  • janosg (7)
  • gauravmanmode (6)
  • r3kste (4)
  • hmgaudecker (3)
  • ChristianZimpelmann (2)
  • sefmef (2)
  • Aziz-Shameem (2)
  • TimBerti (2)
  • Amr-Shams (1)
  • shammeer-s (1)
  • mpetrosian (1)
  • gulshan-123 (1)
Top Labels
Issue Labels
enhancement (19) good first issue (8) feature-request (4) docs (2) bug (2)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 2,478 last-month
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 7
    (may contain duplicates)
  • Total versions: 40
  • Total maintainers: 2
pypi.org: estimagic

Tools to solve difficult numerical optimization problems.

  • Versions: 22
  • Dependent Packages: 2
  • Dependent Repositories: 1
  • Downloads: 820 Last month
Rankings
Stargazers count: 5.0%
Downloads: 5.4%
Dependent packages count: 7.3%
Forks count: 8.0%
Average: 9.6%
Dependent repos count: 22.1%
Maintainers (2)
Last synced: 6 months ago
conda-forge.org: estimagic
  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 6
Rankings
Dependent repos count: 13.9%
Stargazers count: 28.3%
Average: 32.3%
Forks count: 35.4%
Dependent packages count: 51.6%
Last synced: 6 months ago
pypi.org: optimagic

Tools to solve difficult numerical optimization problems.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,658 Last month
Rankings
Dependent packages count: 9.6%
Average: 36.4%
Dependent repos count: 63.2%
Maintainers (2)
Last synced: 6 months ago

Dependencies

.github/workflows/main.yml actions
  • actions/checkout v3 composite
  • codecov/codecov-action v3 composite
  • mamba-org/provision-with-micromamba main composite
.github/workflows/publish-to-pypi.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi
setup.py pypi
environment.yml conda
  • bokeh <=2.4.3
  • click
  • cloudpickle
  • cyipopt <=1.2.0
  • joblib
  • jupyterlab
  • myst-nb
  • nb_black
  • nlopt
  • numpy >=1.17.0
  • pandas
  • pdbpp
  • pip
  • plotly
  • pybaum >=0.1.2
  • pydata-sphinx-theme >=0.3.0
  • pytask >=0.0.11
  • pytest
  • pytest-cov
  • pytest-xdist
  • python 3.10.*
  • scipy >=1.2.1
  • setuptools_scm
  • sphinx
  • sphinx-copybutton
  • sphinx-panels
  • sphinxcontrib-bibtex
  • sqlalchemy
  • statsmodels
  • toml
  • tranquilo >=0.0.4