powered by
xegaBestInPopulation() extracts the best individual of a population and reports fitness, value, genotype, and phenotype:
xegaBestInPopulation()
fitness: The fitness value of the genetic algorithm.
fitness
value: The function value of the problem environment.
value
genotype: The gene representation.
genotype
phenotype: The problem representation. E.g. a parameter list, a program, ...
phenotype
We report one of the best solutions.
xegaBestInPopulation(pop, fit, lF, allsolutions = FALSE)
Named list with the following elements:
$name: The name of the problem environment.
$name
$fitness: The fitness value of the best solution.
$fitness
$value: The evaluated best gene.
$value
$numberOfSolutions: The number of solutions.
$numberOfSolutions
$genotype: The best gene.
$genotype
$phenotype: The parameters of the solution (the decoded gene).
$phenotype
$phenotypeValue: The value of the function of the parameters of the solution (the decoded gene).
$phenotypeValue
$allgenotypes: The genotypes of all best solutions. (allsolutions==TRUE)
$allgenotypes
$allphenotypes: The phenotypes of all best solutions. (allsolutions==TRUE)
$allphenotypes
Population of genes.
Vector of fitness values of pop.
pop
Local function configuration.
If TRUE, also return a list of all solutions.
Other Population Layer: xegaBestGeneInPopulation(), xegaEvalPopulation(), xegaInitPopulation(), xegaLogEvalsPopulation(), xegaNextPopulation(), xegaObservePopulation(), xegaRepEvalPopulation(), xegaSummaryPopulation()
xegaBestGeneInPopulation()
xegaEvalPopulation()
xegaInitPopulation()
xegaLogEvalsPopulation()
xegaNextPopulation()
xegaObservePopulation()
xegaRepEvalPopulation()
xegaSummaryPopulation()
pop10<-xegaInitPopulation(10, lFxegaGaGene) epop10<-xegaEvalPopulation(pop10, lFxegaGaGene) xegaBestInPopulation(epop10$pop, epop10$fit, lFxegaGaGene)
Run the code above in your browser using DataLab