update_generations: Used to perform an iteration of the Genetic Algorithm and...

Description Usage Arguments Value

View source: R/iterations.R

Description

Used to perform an iteration of the Genetic Algorithm and return the next generation from the generation 'individuals'

Usage

1
2
3
update_generations(y, dataset, individuals, objective, pop_size, generation_gap,
  parent_selection, nb_groups, gene_selection, gene_operator, nb_pts,
  reg_method, mu)

Arguments

y

the name of the response variable in the data frame 'dataset'

dataset

the data frame containing the variables in the model

pop_size

the number of individuals in the next generation

generation_gap

the proportion of individuals to bereplaced generation to keep in the next one

nb_groups

the number of subgroups if the tournament selection is the parent selection mechanism

gene_selection

the gene operator, chose between "crossover", "random" for random locis swap or provide the name of your own function inside quotation marks

selection

the name of the parents selection mechanism, the user can provide the name of his own function defining a parent selection mechanism

nb_points

the number of crossover points if gene_selection="crossover"

Value

a list of pop_size new models each a list with fields

variables

the covariates kept in the model

indices

the indices of the covariates kept in the model

linear_model

the linear model for these covariates


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