propotional: Choose parents from generations propotional to their fitness

Description Usage Arguments Value Examples

Description

Choose parents from generations propotional to their fitness

Usage

1
propotional(models, random = TRUE)

Arguments

models:

dataframe with models (specified by the index of selected variables) and their respective fitness value

random:

if TURE, one parent will be selected randomly

Value

The selected parents(list of n lists, each list contains two parents)

Examples

1
2
3
4
5
x <- mtcars[-1]
y <- unlist(mtcars[1])
initial_index <- initialize_parents(10,20)$index
rankedmodels <- ranked_models(initial_index,x,y)
propotional(rankedmodels,random = T)

kunaljaydesai/GA2 documentation built on May 30, 2019, 2:15 p.m.