Learn R Programming

adana (version 1.1.0)

initnorm: Normal distribution based initialization

Description

The pmean and psd arguments of this function represent the mean and standard deviation of a normally distributed population, respectively. Using these parameters, the function generates a random initial population with n individuals and m variables.~

Usage

initnorm(n, m, pmean, psd, type, ...)

Arguments

n

Population size

m

Chromosome length (number of variables)

pmean

Mean of normal distribution

psd

Standard deviation of normal distribution

type

Type of output matrix

Further arguments passed to or from other methods.

Value

The output matrix includes only chromosomes of initial population when type=2, otherwise The output matrix includes chromosomes of initial population and additional two empty columns for generation number and fitness values.

See Also

initbin, initval, initperm, initialize

Examples

Run this code
# NOT RUN {
initpop = initialize(initfunc=initnorm, n=20, m=5, 
  pmean=50, psd=5, type=2) 
head(initpop,3)
# }

Run the code above in your browser using DataLab