cma

Python implementation of CMA-ES

https://github.com/cma-es/pycma

Science Score: 59.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
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    4 of 15 committers (26.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.0%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

Python implementation of CMA-ES

Basic Info
  • Host: GitHub
  • Owner: CMA-ES
  • License: other
  • Language: Jupyter Notebook
  • Default Branch: development
  • Size: 7.45 MB
Statistics
  • Stars: 1,213
  • Watchers: 15
  • Forks: 188
  • Open Issues: 68
  • Releases: 15
Created over 9 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

pycma        

CircleCI Build status GitHub Repo stars Downloads DOI [BibTeX] cite as:

Nikolaus Hansen, Youhei Akimoto, and Petr Baudis. CMA-ES/pycma on Github. Zenodo, DOI:10.5281/zenodo.2559634, February 2019.

pycma is a Python implementation of CMA-ES and a few related numerical optimization tools.

The Covariance Matrix Adaptation Evolution Strategy (CMA-ES) is a stochastic derivative-free numerical optimization algorithm for difficult (non-convex, ill-conditioned, multi-modal, rugged, noisy) optimization problems in continuous and mixed-integer search spaces.

Documentation and Getting Started (Links)

Installation of the latest release

In a system shell, type

sh python -m pip install cma

to install the latest release from the Python Package Index (PyPI). Type install -U instead of install to upgrade a current installation to the latest release. The release link also provides more installation hints and a quick start guide.

Installation from Github

The quick way (this requires git to be installed) to install the code from, for example, the development branch:

sh pip install git+https://github.com/CMA-ES/pycma.git@development

The long way:

  • get the package

    • either download and unzip the code by clicking the green button above
    • or, with git installed, type git clone https://github.com/CMA-ES/pycma.git
  • "install" the package

    • either copy (or move) the cma source code folder into a folder which is in the Python path (e.g. the current folder)
    • or modify the Python path to point to the folder where the cma package folder can be found. In both cases, import cma works without any further installation.
    • or install the cma package by typing

    sh pip install -e . in the (pycma) folder where the cma package folder can be found. Moving the cma folder away from its location invalidates this installation.

It may be necessary to replace pip with python -m pip and/or prefixing either of these with sudo.

Version History

  • Release 4.3.0

    • integer variables of candidate solutions are rounded (addressing also issue #286)
    • moved main docstring from fmin to fmin2
    • experimental plots for error estimates and sensitivities
    • fix numpy scalar type representations at various places
    • replace ineffective use_archives flag with archive_sent_solutions and archive_after_sent
  • Release 4.2.0

    • a stand-alone boundary handling function wrapper BoundDomainTransform
    • streamline plot docs, fix symlog plot with newest matplotlib, plots display the value of .stop() and the version number
    • a few more minor fixes and improvements
    • replace setup.py with pyproject.toml
    • Version 4.1.0 (already since 5a30571f)
    • move boundary handling into a separate module
    • various small-ish fixes and improvements, in particular an edge case in the initialization of the Lagrange multipliers in the constraints handling
  • Release 4.0.0

    • majorly improved mixed-integer handling based on a more concise lower bound of variances and on so-called integer centering
    • moved options and parameters code into a new file
    • many small-ish fixes and improvements
  • Release 3.4.0

    • fix compatibility to numpy 2.0 (thanks to Sait Cakmak)
    • improved interface to noise_handler argument which accepts True as value
    • improved interface to ScaleCoordinates now also with lower and upper value mapping to [0, 1], see issue #210
    • changed: 'ftarget' triggers with <= instead of <
    • assign surrogate attribute (for the record) when calling fmin_lq_surr
    • various (minor) bug fixes
    • various (small) improvements of the plots and their usability
    • display iterations, evaluations and population size and termination criteria in the plots
    • subtract any recorded x from the plotted x-values by x_opt=index
    • plots are now versus iteration number instead of evaluations by default
    • provide legacy bbobbenchmarks without downloading
    • new: CMADataLogger.zip allows sharing plotting data more easily by a zip file
    • new: tolxstagnation termination condition for when the incumbent seems stuck
    • new: collect restart terminations in cma.evalution_strategy.all_stoppings
    • new: stall_sigma_change_on_divergence_iterations option to stall sigma change when the median fitness is worsening
    • new: limit active C update for integer variables
    • new: provide a COCO single function
  • Release 3.3.0 implements

    • diagonal acceleration via diagonal decoding (option CMA_diagonal_decoding, by default still off).
    • fmin_lq_surr2 for running the surrogate assisted lq-CMA-ES.
    • optimization_tools.ShowInFolder to facilitate rapid experimentation.
    • verb_disp_overwrite option starts to overwrite the last line of the display output instead of continuing adding lines to avoid screen flooding with longish runs (off by default).
    • various smallish improvements, bug fixes and additional features and functions.
  • Release 3.2.2 fixes some smallish interface and logging bugs in ConstrainedFitnessAL and a bug when printing a warning. Polishing mainly in the plotting functions. Added a notebook for how to use constraints.

  • Release 3.2.1 fixes plot of principal axes which were shown squared by mistake in version 3.2.0.

  • Release 3.2.0 provides a new interface for constrained optimization ConstrainedFitnessAL and fmin_con2 and many other minor fixes and improvements.

  • Release 3.1.0 fixes the return value of fmin_con, improves its usability and provides a best_feasible attribute in CMAEvolutionStrategy, in addition to various other more minor code fixes and improvements.

  • Release 3.0.3 provides parallelization with OOOptimizer.optimize(..., n_jobs=...) (fix for 3.0.1/2) and improved pickle support.

  • Release 3.0.0 provides non-linear constraints handling, improved plotting and termination options and better resilience to injecting bad solutions, and further various fixes.

  • Version 2.7.1 allows for a list of termination callbacks and a light copy of CMAEvolutionStrategy instances.

  • Release 2.7.0 logger now writes into a folder, new fitness model module, various fixes.

  • Release 2.6.1 allow possibly much larger condition numbers, fix corner case with growing more-to-write list.

  • Release 2.6.0 allows initial solution x0 to be a callable.

  • Version 2.4.2 added the function cma.fmin2 which, similar to cma.purecma.fmin, returns (x_best:numpy.ndarray, es:cma.CMAEvolutionStrategy) instead of a 10-tuple like cma.fmin. The result 10-tuple is accessible in es.result:namedtuple.

  • Version 2.4.1 included bbob testbed.

  • Version 2.2.0 added VkD CMA-ES to the master branch.

  • Version 2.* is a multi-file split-up of the original module.

  • Version 1.x.* is a one file implementation and not available in the history of this repository. The latest 1.* version 1.1.7 can be found here.

Owner

  • Name: CMA-ES
  • Login: CMA-ES
  • Kind: organization

GitHub Events

Total
  • Create event: 16
  • Release event: 1
  • Issues event: 45
  • Watch event: 115
  • Delete event: 15
  • Issue comment event: 81
  • Push event: 6
  • Pull request review event: 4
  • Pull request review comment event: 4
  • Pull request event: 7
  • Fork event: 10
Last Year
  • Create event: 16
  • Release event: 1
  • Issues event: 45
  • Watch event: 115
  • Delete event: 15
  • Issue comment event: 81
  • Push event: 6
  • Pull request review event: 4
  • Pull request review comment event: 4
  • Pull request event: 7
  • Fork event: 10

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 853
  • Total Committers: 15
  • Avg Commits per committer: 56.867
  • Development Distribution Score (DDS): 0.063
Past Year
  • Commits: 70
  • Committers: 2
  • Avg Commits per committer: 35.0
  • Development Distribution Score (DDS): 0.014
Top Committers
Name Email Commits
nikohansen n****n@i****r 799
Youhei Akimoto y****o@s****p 13
ARF1 A****1@g****b 9
Yoshihiko Ueno w****e@h****p 7
Youhei Akimoto y****o@Y****l 7
ARF1 5****1 6
Sait Cakmak s****k@f****m 4
Gabriela Suchopárová g****a@g****m 1
Guillermo Abad López 1****z 1
Kento Nozawa k****w@k****p 1
Luca Rolshoven l****n@s****h 1
Youhei Akimoto y****i@g****m 1
brieglhostis b****1@g****m 1
brockhof d****f@i****r 1
Matthew Chan c****y@m****a 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 170
  • Total pull requests: 15
  • Average time to close issues: 9 months
  • Average time to close pull requests: 9 days
  • Total issue authors: 85
  • Total pull request authors: 11
  • Average comments per issue: 1.76
  • Average comments per pull request: 2.53
  • Merged pull requests: 8
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 46
  • Pull requests: 4
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 7 days
  • Issue authors: 16
  • Pull request authors: 3
  • Average comments per issue: 0.78
  • Average comments per pull request: 2.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • nikohansen (69)
  • Landau1908 (7)
  • enajx (4)
  • a-z-e-r-i-l-a (3)
  • brockho (3)
  • Cascol-SCUT (2)
  • paulduf (2)
  • salomonl (2)
  • yhl48 (2)
  • twoletters (1)
  • LamNgo412 (1)
  • david-woelfle (1)
  • samimia-swks (1)
  • shercklo (1)
  • notajourney (1)
Pull Request Authors
  • GuillermoAbadLopez (2)
  • brieglhostis (2)
  • saitcakmak (2)
  • junghans (2)
  • gabikadlecova (1)
  • ARF1 (1)
  • rolshoven (1)
  • enajx (1)
  • andrewleachtx (1)
  • silvery107 (1)
  • GaetanDesrues (1)
Top Labels
Issue Labels
howto (13) bug (11) FAQ (9) feature request (8) semi-bug (6) engineering (5) usability (4) enhancement (4) algorithm failure (3) question (3) low priority (1) testing (1) bug (minor) (1)
Pull Request Labels

Packages

  • Total packages: 16
  • Total downloads:
    • pypi 585,393 last-month
  • Total docker downloads: 24,434,450
  • Total dependent packages: 69
    (may contain duplicates)
  • Total dependent repositories: 362
    (may contain duplicates)
  • Total versions: 55
  • Total maintainers: 3
pypi.org: cma

CMA-ES, Covariance Matrix Adaptation Evolution Strategy for non-linear numerical optimization in Python

  • Versions: 25
  • Dependent Packages: 56
  • Dependent Repositories: 361
  • Downloads: 585,393 Last month
  • Docker Downloads: 24,434,450
Rankings
Dependent packages count: 0.3%
Docker downloads count: 0.7%
Downloads: 0.7%
Dependent repos count: 0.8%
Average: 1.4%
Stargazers count: 2.1%
Forks count: 3.9%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.18: py3-cma-pyc

Precompiled Python bytecode for py3-cma

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 4.2%
Stargazers count: 8.4%
Forks count: 8.4%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.18: py3-cma

Python implementation of CMA-ES

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 4.2%
Stargazers count: 8.4%
Forks count: 8.4%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-cma

Python implementation of CMA-ES

  • Versions: 8
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 3.4%
Average: 5.6%
Forks count: 9.3%
Stargazers count: 9.9%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.17: py3-cma

Python implementation of CMA-ES

  • Versions: 1
  • Dependent Packages: 3
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 7.2%
Forks count: 8.0%
Stargazers count: 8.1%
Dependent packages count: 12.7%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-cma-pyc

Precompiled Python bytecode for py3-cma

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 8.4%
Forks count: 9.4%
Stargazers count: 9.9%
Dependent packages count: 14.4%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: cma

The Covariance Matrix Adaptation Evolution Strategy (CMA-ES) is a stochastic derivative-free numerical optimization algorithm for difficult (non-convex, ill-conditioned, multi-modal, rugged, noisy) optimization problems in continuous search spaces.

  • Versions: 3
  • Dependent Packages: 8
  • Dependent Repositories: 1
Rankings
Dependent packages count: 7.1%
Stargazers count: 13.9%
Forks count: 14.8%
Average: 15.0%
Dependent repos count: 24.1%
Last synced: 6 months ago
spack.io: py-cma

Python implementation of CMA-ES Covariance Matrix Adaptation Evolution Str ategy for non-linear numerical optimization in Python

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Stargazers count: 7.9%
Forks count: 8.2%
Average: 18.7%
Dependent packages count: 58.6%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.19: py3-cma

Python implementation of CMA-ES

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Last synced: 6 months ago
alpine-v3.22: py3-cma

Python implementation of CMA-ES

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.21: py3-cma-pyc

Precompiled Python bytecode for py3-cma

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.20: py3-cma-pyc

Precompiled Python bytecode for py3-cma

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.22: py3-cma-pyc

Precompiled Python bytecode for py3-cma

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.20: py3-cma

Python implementation of CMA-ES

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.19: py3-cma-pyc

Precompiled Python bytecode for py3-cma

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.21: py3-cma

Python implementation of CMA-ES

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • numpy *