initialize: Genetic Algorithms Initial Population Creation

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Creates the initial population.

Usage

1
initialize(Y, X, P, regType = "lm", family = "gaussian", seed = 1)

Arguments

Y

The response vector as passed into select.

X

The feature matrix as passed into select.

P

The size of the population as passed or determined in select.

regType

The type of regression, either 'lm' or 'glm'.

family

The family for 'glm'.

seed

The seed for reproducibility.

Value

A list of the P generated candidate solutions where each entry of the list contains

Examples

1
2
3
4
5
6
7
8
Y <- mtcars$mpg
X <- mtcars[2:11]
P = 2 * ncol(X)
regType = 'lm'
family = 'gaussian'
seed = 1

initialize(Y, X, P, regType, family, seed)

erickim/GA documentation built on May 28, 2019, 7:15 a.m.