evaluate_fitness: Function to evaluate fitness of chromosomes.

Description Usage Arguments

Description

This function uses default or user supplied ojective functions, rank functions, to evaluate fitness of a generation chromosomes. This process can be parallized if nCores > 1. Parallel operations uses mclapply to parallelize operations. Max number of parallel operations is determined by detectCores. Prescheduling = TRUE is only option for compuations. It is advised to only use parallelization if inputed a large dataframe with great than 1000 oberations and/or predictors.

Usage

1
2
evaluate_fitness(generation_t0, Y, X, family, nCores, minimize,
  objective_function, rank_objective_function)

Arguments

generation_t0

a matrix of parent chromosomes to be evaluated. Columns correspond to predictors/genes and rows correspond to parents/chromosomes.

Y

vector of response variable

X

a matrix or dataframe of predictor variables

family

a character string describing the error distribution and link function to be used in the model. Default is gaussian.

nCores

an integer indicating number of parallel processes to run when evaluating fitness. See evaluate_fitness and details below.

minimize

a logical value indicating whether optimize should be minimized (TRUE) or maximized (FALSE).

objective_function

function for computing objective. Default is AIC. User can specify custom function.

rank_objective_function

a function that ranks parents by their fitness as determined by optimize criteria.

This function uses mclapply to parallel processess. User can specify number of cores to use, with a maximum number of cores equal to output of detectCores. Parallel processing is set to preschedule by default; dynamic parallelization is not available at this time.


yzhou63/GA documentation built on May 3, 2019, 7:07 p.m.