Use Chan's algorithm (Chan, M T (2013). “Klee's measure problem made easy.” In 2013 IEEE 54th annual symposium on foundations of computer science, 410--419. IEEE.) to calculate dominated hypervolume.

domhv(fitnesses, nadir = 0, prefilter = TRUE, on_worse_than_nadir = "warn")

Arguments

fitnesses

(numeric matrix)
fitness matrix, with one row per individual and one column per objective

nadir

(numeric)
Lowest fitness point up to which to calculate dominated hypervolume. May be a scalar, in which case it is used for all dimensions, or a vector, in which case its length must match the number of dimensions. Default 0.

prefilter

(logical(1))
Whether to make a first pass that filters out dominated individuals. If it can be guaranteed that all individuals are non-dominated, setting this to FALSE improves performance a bit. Otherwise the recommended value is the default FALSE.

on_worse_than_nadir

(character(1)) Action when individuals that do not dominate the nadir are found. One of "quiet" (ignore), "warn" (give warning, default), or "stop" (throw error).

Value

numeric(1): The dominated hypervolume of individuals in fitnesses.

Examples

(fitnesses = matrix(c(1, 5, 2, 3, 0, 3, 1, 0, 10, 8), ncol = 2))
#>      [,1] [,2]
#> [1,]    1    3
#> [2,]    5    1
#> [3,]    2    0
#> [4,]    3   10
#> [5,]    0    8

# to see the fitness matrix, use:
## plot(fitnesses, pch = as.character(1:5))

domhv(fitnesses)
#> [1] 32