first_generation: first_generation

Description Usage Arguments Value

View source: R/iterations.R

Description

Performs the first iteration of the Genetic algorithm Generates the first individuals

Usage

1
2
first_generation(y, dataset, population_size, interaction = F, most_sig = F,
  objective_function = "AIC", reg_method)

Arguments

y

the response variable in the dataframe 'dataset'

dataset

the data frame containing the variables in the model

population_size

the number of individuals to generate

interaction

a boolean indicating if we want to take into account terms coming from interactions, False by default

most_sig

a boolean indicating if we want to only consider the most significant covariates

objective_function

The objective criterion to use (default AIC).

reg_method

regression method

Value

a list of individuals each a list with fields:

variable

the covariates kept in the linear model

indices

the indices of these covariates in the data frame

linear_model

the linear model with these covariates


Skjemaa/GA documentation built on May 3, 2019, 6:42 p.m.