gaExpSelection: Exponential Ranking Selection

Description Usage Arguments Examples

View source: R/gaExpSelection.R View source: R/mate.R

Description

In nonlinear Ranking selection method, individuals are first sorted according to their fitness value and then the ranks are assigned to them. Best individual gets rank 'N' and the worst one gets rank '1'. The selection probabilities here are exponentially weighted. The base of the exponent is c.

Usage

1
gaExpSelection(population, fitnessVec, eliteRate, c)

Arguments

population

a matrix of size n*p

fitnessVec

a vector with length n

eliteRate

a proportion between zero and one

c

exponential base

Examples

1
2
3
4
5
6
7
numVar <- 6
N <- 50
population <- matrix(rbinom(numVar*N, 1, prob = 0.5), N, numVar)
fitnessVec <- seq(15, 50, length.out=50)
eliteRate <- 0.05
c <- 0.5
gaExpSelection(population, fitnessVec, eliteRate, c)

dchen49/GA documentation built on May 3, 2019, 6:43 p.m.