initialization: Generate the Initial Generation Randomly

Description Usage Arguments Details Value

Description

Bernoulli sampling to form the initial generation of the Genetic Algorithm.

Usage

1

Arguments

C

chromosome length (number of predictor variables)

Details

This function produces initial generation given the chromosome length for Genetic Algorithm and the population size. The row of the generated boolean matrix represents the locus of a gene(variable), and the column of the matrix represents different members of the first generation.

Value

A Bolean Matrix with dimension C by P where each column representing a chromosome, in which T marks that the gene(variable) as active and F as inactive.


mindyyang/GA-R-package- documentation built on May 12, 2019, 12:31 a.m.