# Genetic Algorithm Tool

## Description

Global Optimization tool. Solves a Genetic Algorithm that mimics the principle of biological evolution in a search for a global optimization solution for the contained model.

## Inputs

Name | Type | Description |
---|---|---|

Use Convergence Stopping Criteria | Real Value Type | If true, the optimization process will halt if evolution of generations becomes asymptotic, as defined by the asymptotic parameter. Otherwise, the total number of generations specified by “Number Of Generations” is used. |

Number of Generations | Positive Integer Value Type | If the “Use Convergence Stopping Criteria” is true, the “Number Of Generations” specifies the minimum number of generations to detect convergence. Otherwise, it becomes the maximum number of generations. |

Population Size | Positive Integer Value Type | Number of individuals per population. |

Individual Genotype | Lookup Table Group Type | The genotype that defines the template for individuals. |

Default Lower Bound | Real Value Type | The default lower value for alleles. |

Default Upper Bound | Real Value Type | The default upper value for alleles. |

## Optional Inputs

Name | Type | Description | Default Value |
---|---|---|---|

Convergence Limit | Percent Type | Convergence limit (in percentage of fitness variation) across the given number of generations used to halt the optimization process. | 0.99 |

Lower Bounds | Lookup Table Group Type | The lower limits per alleles. If omitted, the “Default Lower Bound” is used for missing limits. | None |

Upper Bounds | Lookup Table Group Type | The upper limits per alleles. If omitted, the “Default Upper Bound” is used for missing limits. | None |

Meta Heuristic Evaluation Percent | Percent Type | A percentage of individuals whose finesses are obtained via meta-heuristic estimation (in percentage of individuals). | None |

Maximum Log Level | Log Tag Type | Maximum log level used to run the contained functors. | Warning |

## Outputs

Name | Type | Description |
---|---|---|

Best Individual | Lookup Table Group | The resulting best individual from all generations. |

Best Individual Fitness | Real Value | The 'fitness' score of the overall best individual. |

Worst Fitness Per Generation | Real Value | The 'fitness' score of the worst individual per generation. |

## Group

## Notes

To calibrate Weights of Evidence coefficients, the “.dcf” file representing the Weight of Evidence ranges and coefficients can be converted into the corresponding set of “.csv” tables and back to the original format using the ConvertWeightFiles utility.

If the “Meta Heuristic Evaluation Percent” parameter is defined, a percent of individuals estimate their corresponding fitness value using the KNN algorithm. To ensure the KNN estimations are accurate, the meta heuristic is used only after a given number of generations (usually after 30% of the total generations).

When the convergence is used, it is detected when there is not even a minimum percent (1 - “Convergence Limit”) of improvement in the best fitness value in the window formed by the “Number of Generations” last generations.

Here is a summary of the algorithm implemented by this functor:

1) First, an initial population of “Population Size” individuals is generated using the initial individual (“Individual Genotype”) as a seed and the given bounds as lower and upper limit (“Upper Bound” and “Lower Bound”, respectively).

2) Basically, there are two different execution modes (controlled by the “Use Convergence Stopping Criteria” flag): fixed number of generations (“Number of Generations”) or iteration until convergence.

3) The fitness value for all individuals is calculated and the individual having the best fitness value is saved internally as the best individual for the current generation.

4) A given percent of the individuals is selected based on tournament results. The selected individuals are reproduced using crossovers and mutations and used to form the next generation.

6) If the stopping criteria defined by item 2 was not reached yet, the execution continues at item 3. Otherwise, the individual having the best fitness among all generations is returned.

## Internal Name

GeneticAlgorithmTool