RegCMA is a Python implementation of Regulated Evolution Strategies [1] with Covariance Matrix Adaption [2] for continuous "Black-Box" optimization problems. RegCMA is suitable for optimization in situations where the allowed number of iterations is limited such as hyper-parameter tuning in machine learning model and optimization algorithm, and it attempts to make the most of them to find good solutions.
pip install git+https://github.com/snowberryfield/regcma.git
Regulated Evolution Strategies (hereinafter referred to as RES) is a evolutionary algorithm framework to attempts to find reasonable solutions of following unconstrained minimization problems:
where
where
The RES framework provides the following theorem that states convergence of sample dispersion.
Theorem 1 [1]: Let
then
holds. Also, as a byproduct of this theorem, we have the following estimator:
With this estimator, we can design the value of
# -*- coding: utf-8 -*-
import regcma
import numpy as np
# Define the objective function to be minimized.
def quadratic(x): return x.dot(x)
# Define the initial solution.
DIMENSION = 10
x0 = np.random.randn(DIMENSION)
option = {
'iteration_max': 100,
'initial_covariance': 1E0,
'convergence_tolerance': 1E-10
}
result = regcma.solve(quadratic, x0, option, plot=True)
In the example above, RegCMA minimizes the objective function with regulating its sampling dispersion so that the convergence index (mean of diagonal components of the 1E-10
at iteration 100
. The following plot depicts the search trend. The chart of Convergence Index shows that actual convergence index tracks the theoretical reference.
Please refer List of Options.
RegCMA is distributed under MIT license.
-
[1] Yuji Koguma : Regulated Evolution Strategies: A Framework of Evolutionary Algorithms with Stability Analysis Result, IEEJ Transactions on Electrical and Electronic Engineering, Vol.15, No.9, pp.1337-1349 (2020). https://onlinelibrary.wiley.com/doi/abs/10.1002/tee.23201
-
[2] N.Hansen: The CMA Evolution Strategy: A Tutorial, arXiv:1604.00772 [cs.LG] (2016). https://arxiv.org/abs/1604.00772