monprogress | R Documentation |
Monprogress function performs by creating a line plot of the best fitness value found across generations.
monprogress(g, genfits, objective, ...)
g |
Generation number |
genfits |
A matrix for fitness values |
objective |
Type of optimization. "min" or "max" |
... |
Further arguments passed to or from other methods. |
No return value, called for the side effect of drawing a plot.
Zeynel Cebeci & Erkut Tekeli
show
n = 100 genfits = matrix(NA, nrow=n, ncol=5) genfits[1,3] = 50 objective = "max" for(i in 1:(n-1)){ g=i monprogress(g=g, genfits=genfits, objective=objective) genfits[g+1, 3] = genfits[g, 3] + runif(1, -2, 5) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.