terminatePAC {xegaPopulation}R Documentation

Terminates if relative deviation from estimated PAC bound for optimum is small. Works at 0.

Description

terminatePAC() returns TRUE if the value of the current solution is in the interval from (PACopt - (PACopt*eps)) to (PACopt + (PACopt*eps)). If PACopt is zero, test interval (0-eps) to (0+eps).

Usage

terminatePAC(solution, lF)

Arguments

solution

A named list with at least the following elements: $name, $fitness, $value, $numberOfSolutions, $genotype, $phenotype, $phenotypeValue.

lF

Local function configuration. It must contain

  • lF$PACopt() which returns an estimation of an upper PAC bound ub for the global optimum g with P(ub<g)<lF$PACdelta().

  • lF$TerminationEps() which specifies the the fraction of the global optimum used for computing the upper and lower bounds for the interval in which the best current solution must be for terminating the algorithm.

Details

By an idea of M. Talagrand we estimate lF$PACopt() from the mean m and the standard deviation s of the population fitness of the first population of the genetic algorithm we compute m+s*qnorm(lF$PACdelta(), lower.tail=FALSE) when the function we optimize is in Hilbert space. For other spaces, this has to be adapted.

Value

Boolean.

See Also

Other Termination Condition: terminateAbsoluteError(), terminateGEQ(), terminateLEQ(), terminateRelativeError(), terminateRelativeErrorZero(), terminatedFalse()

Examples

    parm<-function(x){function() {return(x)}}
    lF<-list(); lF$PACopt<-parm(10.0); lF$TerminationEps<-parm(1.2);lF$Max<-parm(1.0)
    solution<-list(); solution$genotype<-list();  solution$genotype$fit<-0.5
    terminatePAC(solution, lF)
    solution<-list(); solution$genotype<-list();  solution$genotype$fit<-9.6
    terminatePAC(solution, lF)

[Package xegaPopulation version 1.0.0.7 Index]