DifferentialEvolutionOptimizer.CrossoverRate Property

Gets or sets the crossover rate used in the algorithm.

Definition

Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.0
C#
public double CrossoverRate { get; set; }

Property Value

Double

Remarks

The crossover rate must be between 0 and 1. The default value is 0.9.

A higher crossover rate (close to 1) increases the probability that more components of the trial vector will come from the mutant vector, which can enhance exploration of the search space. This is beneficial for problems where the global optimum is far from the initial population.

A lower crossover rate (close to 0) means that fewer components of the trial vector will come from the mutant vector, which can enhance exploitation of the current population. This is useful for fine-tuning solutions when the algorithm is close to convergence.

The optimal crossover rate depends on the specific optimization problem. For problems with many local optima, a higher crossover rate may help in escaping local optima. For smoother landscapes, a lower crossover rate may suffice. It is often useful to experiment with different values to find the most effective one for a given problem.

The default value is 0.9.

Exceptions

ArgumentOutOfRangeException

The value is outside the range [0,1].

See Also