Learn R Programming

emcAdr (version 1.2)

plot_evolution: Plot the evolution of the mean and the best value of the population used by the GeneticAlgorithm

Description

Plot the evolution of the mean and the best value of the population used by the GeneticAlgorithm

Usage

plot_evolution(
  list,
  mean_color = "#F2A900",
  best_color = "#008080",
  xlab = "Epochs",
  ylab = "Score"
)

Value

no returned value, should plot the evolution of the genetic algorithm results (mean/max score for each epoch).

Arguments

list

A list with 2 elements returned by the GeneticAlgorithm: "mean" and "best", containing the numeric vectors representing the mean and best fitness of the population

mean_color

A string specifying the color of the mean values

best_color

A string specifying the color of the best values

xlab

A string specifying the label for the x-axis

ylab

A string specifying the label for the y-axis

Examples

Run this code
# \donttest{
data("ATC_Tree_UpperBound_2024")
data("FAERS_myopathy")

results = GeneticAlgorithm(epochs = 10, nbIndividuals = 10, 
            ATCtree = ATC_Tree_UpperBound_2024,
            observations = FAERS_myopathy)

plot_evolution(list = results)
# }

Run the code above in your browser using DataLab