Package mystic :: Module termination

Module termination

source code

Factories that provide termination conditions for a mystic.solver

Functions
 
VTR(tolerance=0.005)
cost of last iteration is < tolerance:
source code
 
ChangeOverGeneration(tolerance=1e-6, generations=30)
change in cost is < tolerance over a number of generations:
source code
 
NormalizedChangeOverGeneration(tolerance=1e-4, generations=10)
normalized change in cost is < tolerance over number of generations:
source code
 
CandidateRelativeTolerance(xtol=1e-4, ftol=1e-4)
absolute difference in candidates is < tolerance:
source code
Variables
  abs = absolute
  EARLYEXIT = 0
Function Details

VTR(tolerance=0.005)

source code 

cost of last iteration is < tolerance:

cost[-1] < tolerance

ChangeOverGeneration(tolerance=1e-6, generations=30)

source code 

change in cost is < tolerance over a number of generations:

cost[-g] - cost[-1] < tolerance, where g=generations

NormalizedChangeOverGeneration(tolerance=1e-4, generations=10)

source code 

normalized change in cost is < tolerance over number of generations:

(cost[-g] - cost[-1]) / 0.5*(abs(cost[-g]) + abs(cost[-1])) <= tolerance

CandidateRelativeTolerance(xtol=1e-4, ftol=1e-4)

source code 

absolute difference in candidates is < tolerance:

abs(xi-x0) <= xtol & abs(fi-f0) <= ftol, where x=params & f=cost