Welcome to pyDE’s documentation!

de

de package

Submodules

de.optimization

This module contains the core Differential Evolution calculations.

de.optimization.optimize(fobj, dim, low_limit, high_limit, N=100, max_number_of_generations=2000, mutation_parameter=0.9, scale_factor=0.5, seed=974378)[source]

Differential Evolution calculations. This routine computes a minimum of a given objective function. The actual method is only valid for unconstrained optimization problems.

Parameters:
  • fobj (function) – The objective function.
  • dim (int) – Number of dimensions of the objective function’s argument.
  • low_limit (float) – The inferior limit of the hypercube search region.
  • high_limit (float) – The superior limit of the hypercube search region.
  • N (int) – The number of individuals to be generated.
  • max_number_of_generations (int) – Max number of generations to be employed by the procedure.
  • mutation_parameter (float) – A parameter to related to the success’ rate of mutations.
  • scale_factor (float) – A scale factor of linear combination employed in the mutation procedure.
  • seed (int) – A seed to be employed in the pseudo-random numbers generation.
Returns:

The solution coordinates, the objective function evaluated at this point, the method convergence’s flag and the output log message.

Return type:

tuple

de.benchmarks

Provides some benchmark problems to global optimization.

de.benchmarks.f_ackley(x, a, b, c)[source]

Define the benchmark Ackley function.

Parameters:
  • x (numpy.ndarray) – The function’s argument array.
  • a (float) – Function’s constant.
  • b (float) – Function’s constant.
  • c (float) – Function’s constant.
Returns:

The evaluated function at the given input array.

Return type:

float

de.benchmarks.f_rosenbrock(x)[source]

Define the benchmark Rosenbrock function.

Parameters:x (numpy.ndarray) – The function’s argument array.
Returns:The evaluated function at the given input array.
Return type:float

Indices and tables