CR-FM-NES [slide]
CR-FM-NES [1] implementation. The main feature of CR-FM-NES is that both time and space complexity are linear, with partially considering variable dependencies. Therefore, it is especially suitable for high-dimensional problems (about hundreds to thousands of dimensions). On the other hand, it often achieves high performance even on low-dimensional problems. This is an extension of FM-NES (Fast Moving Natural Evolution Strategy) [2] to be applicable in high-dimensional problems. Please e-mail at masahironomura5325@gmail.com if you have any issue.
If you find this code useful in your research then please cite:
@INPROCEEDINGS{nomura2022fast,
title={Fast Moving Natural Evolution Strategy for High-Dimensional Problems},
author={Nomura, Masahiro and Ono, Isao},
booktitle={2022 IEEE Congress on Evolutionary Computation (CEC)},
pages={1-8},
year={2022},
}
News
- (2022/07) The paper Fast Moving Natural Evolution Strategy for High-Dimensional Problems has been accepted at IEEE CEC'22.
- (2022/12) CR-FM-NES has been integrated into evosax, which provides JAX-based evolution strategies implementation. Thanks @RobertTLange and @Obliman!
Getting Started
Prerequisites
You need only NumPy that is the package for scientific computing.
Installing
Please run the following command.
$ pip install crfmnes
Example
This is a simple example that objective function is sphere function. Note that the optimization problem is formulated as minimization problem.
import numpy as np
from crfmnes import CRFMNES
dim = 3
f = lambda x: np.sum(x**2)
mean = np.ones([dim, 1]) * 0.5
sigma = 0.2
lamb = 6
crfmnes = CRFMNES(dim, f, mean, sigma, lamb)
x_best, f_best = crfmnes.optimize(100)
print("x_best:{}, f_best:{}".format(x_best, f_best))
# x_best:[1.64023896e-05 2.41682149e-05 3.40657594e-05], f_best:2.0136169613476005e-09
For Constrained Problems
CR-FM-NES can be applied to (implicitly) constrained black-box optimization problems.
Please set the objective function value of the infeasible solution to np.inf.
CR-FM-NES reflects the information and performs an efficient search.
Please refer to [3] for the details of the constraint handling methods implemented in this repository.
Other Versions of CR-FM-NES
I really appreciate that CR-FM-NES is implemented in other settings.
- C# Implementation: bakanaouji/CRFMNES_CS
- C++ Implementation: dietmarwo/fast-cma-es
- Jax(Python) Implementation: RobertTLange/evosax
References
- [1] M. Nomura, I. Ono, Fast Moving Natural Evolution Strategy for High-Dimensional Problems, IEEE CEC, 2022.
- [2] M. Nomura, I. Ono, Natural Evolution Strategy for Unconstrained and Implicitly Constrained Problems with Ridge Structure, IEEE SSCI, 2021.
- [3] M. Nomura, N. Sakai, N. Fukushima, and I. Ono, Distance-weighted Exponential Natural Evolution Strategy for Implicitly Constrained Black-Box Function Optimization, IEEE CEC, 2021.
Metadata
Release files for crfmnes 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| crfmnes-1.0.0.tar.gz | 6.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crfmnes-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / crfmnes-1.0.0.tar.gz
| Download URL | crfmnes-1.0.0.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7708326f984268e624fb1bd6a2bad4c99352a228b06972cb182d5a7ba7d86ac9
|
|
BLAKE2b-256 checksum How to use checksums |
c64a9c0c1aa1cc331095872b1602b59508d34208269d30eb9e3273608a657edb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Release files / crfmnes-1.0.0-py3-none-any.whl
| Download URL | crfmnes-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5a8d1c7c63e0e2cf38fb36238a47e879946b75443bfdcd2af40b3edbbdee338
|
|
BLAKE2b-256 checksum How to use checksums |
41950d6e27ac8875c8490fbedb77c21a30223168e7595f927a0e7a92b1c34597
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Security for crfmnes 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.