Learn R Programming

smoof (version 1.7.0)

makeMPM2Function: Generator for function with multiple peaks following the multiple peaks model 2

Description

Generator for function with multiple peaks following the multiple peaks model 2

Usage

makeMPM2Function(
  n.peaks,
  dimensions,
  topology,
  seed,
  rotated = TRUE,
  peak.shape = "ellipse",
  evaluation.env = "R"
)

Value

[smoof_single_objective_function] An object of class SingleObjectiveFunction, representing the Multiple peaks model 2 Function.

Arguments

n.peaks

[integer(1)]
Desired number of peaks, i. e., number of (local) optima.

dimensions

[integer(1)]
Size of corresponding parameter space.

topology

[character(1)]
Type of topology. Possible values are “random” and “funnel”.

seed

[integer(1)]
Seed for the random numbers generator.

rotated

[logical(1)]
Should the peak shapes be rotated? This parameter is only relevant in case of elliptically shaped peaks.

peak.shape

[character(1)]
Shape of peak(s). Possible values are “ellipse” and “sphere”.

evaluation.env

[character(1)]
Evaluation environment after the function was created. Possible (case-insensitive) values are “R” (default) and “Python”. The original generation of the problem is always done in the original Python environment. However, evaluation in R is faster, especially if multiple MPM2 functions are used in a multi-objective setting.

Author

R interface by Jakob Bossek. Original python code provided by the Simon Wessing.

References

See the technical report of multiple peaks model 2 for an in-depth description of the underlying algorithm.

Examples

Run this code
if (FALSE) {
fn = makeMPM2Function(n.peaks = 10L, dimensions = 2L,
  topology = "funnel", seed = 123, rotated = TRUE, peak.shape = "ellipse")
if (require(plot3D)) {
  plot3D(fn)
}
}
if (FALSE) {
fn = makeMPM2Function(n.peaks = 5L, dimensions = 2L,
  topology = "random", seed = 134, rotated = FALSE)
plot(fn, render.levels = TRUE)
}

Run the code above in your browser using DataLab