Description Usage Arguments Author(s) Examples
generate_mutation is used to generate offsprings after mutations based on particular mutation rate. And it will give the values of goodness of fit for each offspring.
1 | generate_mutation(input, mutation_rate, main_dataset)
|
input |
A matrix contains all the populations which are required to mutate. The number in each cell should be either 0 or 1. Each row represents an individual. Each column represents the variable. |
mutation_rate |
The chance for each variable in each individual to change the value. |
main_dataset |
The dataset used to run the regression model. And its model help to get the corresponding value of goodness of fit. |
regression_target |
character: column of df regressed on other covariates in df |
Xiao Li
1 2 3 4 5 6 | # 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 <- as.matrix(toy_datasets$population)
generate_mutation(population, 0.01, main_dataset,regression_target)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.