whv_hype: Approximation of the (weighted) hypervolume by Monte-Carlo...

View source: R/whv.R

whv_hypeR Documentation

Approximation of the (weighted) hypervolume by Monte-Carlo sampling (2D only)

Description

Return an estimation of the hypervolume of the space dominated by the input data following the procedure described by \citetAugBadBroZit2009gecco. A weight distribution describing user preferences may be specified.

Usage

whv_hype(
  x,
  reference,
  ideal,
  maximise = FALSE,
  nsamples = 100000L,
  seed = NULL,
  dist = "uniform",
  mu = NULL
)

Arguments

x

matrix()|data.frame()
Matrix or data frame of numerical values, where each row gives the coordinates of a point.

reference

numeric()
Reference point as a vector of numerical values.

ideal

numeric()
Ideal point as a vector of numerical values.

maximise

logical()
Whether the objectives must be maximised instead of minimised. Either a single logical value that applies to all objectives or a vector of logical values, with one value per objective.

nsamples

integer(1)
Number of samples for Monte-Carlo sampling. Higher values typically produce more accurate approximations of the true hypervolume, but require more time.

seed

integer(1)
Random seed.

dist

character(1)
Weight distribution type. See Details.

mu

numeric()
Parameter of the weight distribution. See Details.

Details

The current implementation only supports 2 objectives.

A weight distribution \citepAugBadBroZit2009gecco can be provided via the dist argument. The ones currently supported are:

  • "uniform" corresponds to the default hypervolume (unweighted).

  • "point" describes a goal in the objective space, where the parameter mu gives the coordinates of the goal. The resulting weight distribution is a multivariate normal distribution centred at the goal.

  • "exponential" describes an exponential distribution with rate parameter 1/mu, i.e., \lambda = \frac{1}{\mu}.

Value

A single numerical value.

References

\insertAllCited

See Also

read_datasets(), eafdiff(), whv_rect()

Examples

whv_hype(matrix(2, ncol=2), reference = 4, ideal = 1, seed = 42)
whv_hype(matrix(c(3,1), ncol=2), reference = 4, ideal = 1, seed = 42)
whv_hype(matrix(2, ncol=2), reference = 4, ideal = 1, seed = 42,
         dist = "exponential", mu=0.2)
whv_hype(matrix(c(3,1), ncol=2), reference = 4, ideal = 1, seed = 42,
         dist = "exponential", mu=0.2)
whv_hype(matrix(2, ncol=2), reference = 4, ideal = 1, seed = 42,
         dist = "point", mu=c(2.9,0.9))
whv_hype(matrix(c(3,1), ncol=2), reference = 4, ideal = 1, seed = 42,
         dist = "point", mu=c(2.9,0.9))

moocore documentation built on July 12, 2026, 5:06 p.m.