cga_generate_chromosome {eive} R Documentation

## cga_generate_chromosome

### Description

Generates vector of zeros and ones for a given probability vector.

### Usage

cga_generate_chromosome(prob_vec)


### Arguments

 prob_vec Vector of probabilities.

### Details

This function is not directly called by user. CGA (Compact genetic algorithms) sample chromosomes using this probability vector. A probability vector contains [P1,P2,...,PN] and the function generates and returns a chromosome [B1,B2,...,BN]. The probability of BK having the value of 1 is PK. So, it has more chance to have [1,1,1,0,0] than [0,0,0,1,1] when the probability vector is [0.9,0.9,0.9,0.1,0.1].

### Value

Returns the generated chromosome for a given probability vector. Return type is vector.

### Author(s)

Mehmet Hakan Satman <mhsatman@istanbul.edu.tr> Erkin Diyarbakirlioglu <ediyarbakirlioglu@gmail.com>

[Package eive version 2.3 Index]