Skip to contents

saveMetaepochsPopulations method for "hms" class.

Usage

saveMetaepochsPopulations(object, path, dimensions)

Arguments

object

hms s4 object

path

path

dimensions

vector of two selected dimensions e.g. c(1,2)

Value

It doesn't return anything. It creates plots and saves them to a specified directory.

Examples

fitness <- function(x) x[1] + x[2]
lower <- c(-5, -5)
upper <- c(5, 5)
result <- hms(fitness = fitness, lower = lower, upper = upper)
#> A list of standard deviations (sigma) or a function to create population should be provided.
#> Metaepoch: 0 Best fitness: 9.707709 
#> Metaepoch: 1 Best fitness: 9.84095 
#> Metaepoch: 2 Best fitness: 9.905132 
#> Metaepoch: 3 Best fitness: 9.905132 
#> Metaepoch: 4 Best fitness: 9.97238 
#> Metaepoch: 5 Best fitness: 9.97238 
#> Metaepoch: 6 Best fitness: 9.97238 
#> Metaepoch: 7 Best fitness: 9.97238 
#> Metaepoch: 8 Best fitness: 9.97238 
#> Metaepoch: 9 Best fitness: 9.97238 
selected_dimensions <- c(1, 2)
saveMetaepochsPopulations(result, tempdir(), selected_dimensions)