Random-Projection Estimation of Distribution Algorithm (RPEDA)

class pypop7.optimizers.eda.rpeda.RPEDA(problem, options)[source]

Random-Projection Estimation of Distribution Algorithm (RPEDA).

Note

RPEDA uses random matrix theory (RMT) to sample individuals on multiple embedded subspaces, though it still evaluates all individuals on the original search space. It has a quadractic time complexity w.r.t. each sampling for large-scale black-box optimization.

Parameters:
  • problem (dict) –

    problem arguments with the following common settings (keys):
    • ’fitness_function’ - objective function to be minimized (func),

    • ’ndim_problem’ - number of dimensionality (int),

    • ’upper_boundary’ - upper boundary of search range (array_like),

    • ’lower_boundary’ - lower boundary of search range (array_like).

  • options (dict) –

    optimizer options with the following common settings (keys):
    • ’max_function_evaluations’ - maximum of function evaluations (int, default: np.Inf),

    • ’max_runtime’ - maximal runtime (float, default: np.Inf),

    • ’seed_rng’ - seed for random number generation needed to be explicitly set (int);

    and with the following particular settings (keys):
    • ’n_individuals’ - number of offspring, offspring population size (int, default: 300),

    • ’n_parents’ - number of parents, parental population size (int, default: int(0.25*options[‘n_individuals’])),

    • ’k’ - projection dimensionality (int, default: 3),

    • ’m’ - number of random projection matrices (int, default: int(np.ceil(4*options[‘n_individuals’]/options[‘k’])).

Examples

Use the optimizer to minimize the well-known test function Rosenbrock:

 1>>> import numpy  # engine for numerical computing
 2>>> from pypop7.benchmarks.base_functions import rosenbrock  # function to be minimized
 3>>> from pypop7.optimizers.eda.rpeda import RPEDA
 4>>> problem = {'fitness_function': rosenbrock,  # define problem arguments
 5...            'ndim_problem': 20,
 6...            'lower_boundary': -5*numpy.ones((20,)),
 7...            'upper_boundary': 5*numpy.ones((20,))}
 8>>> options = {'max_function_evaluations': 500000,  # set optimizer options
 9...            'seed_rng': 2022,
10...            'k': 2}
11>>> rpeda = RPEDA(problem, options)  # initialize the optimizer class
12>>> results = rpeda.optimize()  # run the optimization process
13>>> # return the number of function evaluations and best-so-far fitness
14>>> print(f"RPEDA: {results['n_function_evaluations']}, {results['best_so_far_y']}")
15RPEDA: 500000, 15.67048345324486
n_individuals

number of offspring, aka offspring population size.

Type:

int

n_parents

number of parents, aka parental population size.

Type:

int

k

projection dimensionality.

Type:

int

m

number of random projection matrices.

Type:

int

References

Kabán, A., Bootkrajang, J. and Durrant, R.J., 2016. Toward large-scale continuous EDA: A random matrix theory perspective. Evolutionary Computation, 24(2), pp.255-291. https://direct.mit.edu/evco/article-abstract/24/2/255/1016/Toward-Large-Scale-Continuous-EDA-A-Random-Matrix