Takes a matrix of fitness values and calculates the hypervolume contributions of individuals in that matrix.

Hypervolume contribution of an individual I is the difference between the dominated hypervolume of a set of individuals including I, where the fitness of I is increased by epsilon, and the dominated hypervolume of the same set but excluding I.

Individuals that are less than another individual more than epsilon in any dimension have hypervolume contribution of 0.

domhv_contribution(fitnesses, nadir = 0, epsilon = 0)

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.

epsilon

(numeric)
Added to each individual before calculating its particular hypervolume contribution. epsilon 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.

Value

numeric: The vector of dominated hypervolume contributions for each individual 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_contribution(fitnesses)
#> [1]  0  2  0 27  0