Early Stop Criteria

This module provides early stop criteria for evolutionary algorithms.

Provides various stopping conditions for evolutionary algorithms, including score-based and generation-based termination strategies.

Max Evaluation Criteria

class pyevopt.early_stop.MaxEvaluationCriteria(max_evaluation: int = 60)

Termination criterion based on the maximum number of evaluations allowed. Maximum evaluation limit for an optimization run.

check() → bool

Check the condition to decide if a new iteration of the optimization process should be executed.

Return

bool:

True if stop criteria is meet, False otherwise.

next(**kwargs) → None

Get the next evaluation limit based on the current number of evaluations.

Parameters

evaluation: int

Number of evaluations calculated in this iteration.

Max Iteration Criteria

class pyevopt.early_stop.MaxIterationCriteria(max_iter: int = 60)

Termination criterion based on the maximum number of iterations allowed. Maximum iteration limit for an optimization run.

check() → bool

Check the condition to decide if continue the process or not.

Return

bool:

True if stop criteria is met, False otherwise.

next(**kwargs)

Update iteration number in the optimization process.