Fitness: Calculate Chromosome Fitness

Description Usage Arguments Details Value Examples

Description

Calculate a relative fitness based on the rankscore of each chromosome.

Usage

1
Fitness(scores)

Arguments

scores

A vector of the score for each chromosome, as calculated from scoreFunc().

Details

This function calculates a relative fitness for each chromosome based on the output of scoreFunc(). It follows the formula from Givens_Hoeting_CH3 section 3.4.2.1, providing a better optimization than the scoreFunc() alone.

WARNING: This function scores the same way as scoreFunc(), ie, if AIC() is the scoreFunc(), then lower scores are better, and this function will follow that convention.

Value

A vector of the relative fitness of each chromosome.

Examples

1
2
3
set.seed(42)
test_Scores <- rnorm(x = 10, mean = 10, sd = 1)
Fitness(test_Scores)

GilChrist19/GA documentation built on May 13, 2019, 5:32 p.m.