Description Usage Arguments Author(s) Examples
get_next_population generate next population to use based on two methods. The first method is to replace the worst certain percent of original population by offsprings. The second method is to combine all parents and offsprings, and then choose the top individuals.
1 | get_next_population(parents, offsprings, scheme)
|
parents |
a matrix contains the original population |
offsprings |
a matrix contains all offsprings |
scheme |
"proportion" returns the first method and "re-rank" returns the second method |
Xiao Li
1 2 3 4 5 6 7 8 | #Generate random input and choose a specific dataset in R
regression_target <- "V1"
toy_datasets <- generate_toy_dataset(regression_target = regression_target)
main_dataset <- toy_datasets$main_dataset
population <- toy_datasets$population
population$"goodness_of_fit_values" <- runif(50,0,100)
offsprings <- population[sample(1:50,20),]
get_next_population(population,offsprings,scheme = "re-rank")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.