paref.moo_algorithms.stopping_criteria.convergence_reached#
Classes
|
Stopping criteria based on the (2-)distance of the previous evaluations |
- class paref.moo_algorithms.stopping_criteria.convergence_reached.ConvergenceReached(epsilon: float = 0.05)[source]#
Bases:
StoppingCriteriaStopping criteria based on the (2-)distance of the previous evaluations
compare the previous two evaluations, calculate their (2-)distance and stop when the distance is smaller or equal than a certain epsilon. For example, if the previous evaluations of the blackbox function are (1,1) and (1,1.1) and the threshold is 0.1, then, the stopping criteria returns true since the (2-)distance is 0.1<=epsilon.
Examples
# TBA: add
- Parameters:
epsilon (float, default 1e-3) – minimal distance until stopping criteria is reached
- __call__(blackbox_function: BlackboxFunction) bool[source]#
- Returns:
true if the 2-norm of the previous two evaluations of the blackbox function is smaller or equal epsilon and false otherwise
- Return type:
bool