gena.population {gena} | R Documentation |
Population
Description
Initialize the population of chromosomes.
Usage
gena.population(pop.n, lower, upper, pop.initial = NULL, method = "uniform")
Arguments
pop.n |
positive integer representing the number of chromosomes in population. |
lower |
numeric vector which i-th element determines the minimum possible value for i-th gene. |
upper |
numeric vector which i-th element determines the maximum possible value for i-th gene. |
pop.initial |
numeric matrix which rows are initial chromosomes suggested by user. |
method |
string representing the initialization method to be used. For a list of possible values see Details. |
Details
If "method = uniform"
then i-th gene of each chromosome is randomly
(uniformly) chosen between lower[i]
and upper[i]
bounds. If
"method = normal"
then i-th gene is generated from a truncated
normal distribution with mean (upper[i] + lower[i]) / 2
and
standard deviation (upper[i] - lower[i]) / 6
where lower[i]
and upper[i]
are lower and upper truncation bounds correspondingly.
If "method = hypersphere"
then population is simulated uniformly
from the hypersphere with center upper - lower
and radius
sqrt(sum((upper - lower) ^ 2))
via rhypersphere
function setting type = "inside"
.
Value
This function returns a matrix which rows are chromosomes.
References
B. Kazimipour, X. Li, A. Qin (2014). A review of population initialization techniques for evolutionary algorithms. 2014 IEEE Congress on Evolutionary Computation, 2585-2592, <doi:10.1109/CEC.2014.6900618>.
Examples
set.seed(123)
gena.population(pop.n = 10,
lower = c(-1, -2, -3),
upper = c(1, 0, -1),
pop.initial = rbind(c(0, -1, -2),
c(0.1, -1.2, -2.3)),
method = "normal")