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