libmoon.metric
Functions
Metrics can be divided into two parts, the first part measures the quality of a set of solutions \(\mathbb{S} = \{ y^{(1)}, \ldots, y^{(N)} \}\).
- compute_hv(solutions)
The hypervolume indicator measures the dominated volume by at least one objective belongs to the set \(\mathbb{Y}\) with a reference point \(\mathcal{r}\).
\[\begin{align*} \mathrm{HV}_\mathcal{r} = \mathrm{Vol}( \{\mathcal{y} | \exists \mathcal{y'} \in \mathbb{Y}, \mathcal{y'} \preceq \mathcal{y} \preceq \mathcal{r} \} ). \end{align*}\]- Parameters:
solutions (list)
- compute_lmin(solutions)
Minimal distance indicator \((l_{\min})\), which measures the minimal pairwise distances among all objectives.
\[\begin{align*} \mathrm{l}_{\min} = \min_{1 < i < j < N} \rho(y^{(i)}, y^{(j)}), \end{align*}\]where \(\rho\) denotes the Euclidean distance. :param list solutions:
- compute_slmin(solutions)
Soft minimal distance indicator }, which serves as the “soft-min” version of the minimal distance function
\[\begin{equation} \mathrm{sl}_{\min} = -\frac{1}{hN(N-1)} \log \left( \sum_{1 < i < j < N} \exp\left(-h \rho\left(y^{(i)}, y^{(j)}\right)\right) \right). \end{equation}\]- Parameters:
solutions (list)
- compute_spacing(solutions)
Spacing indicator is supposed to be small, which indicates that objectives vectors are uniformly distributed. Spacing indicator is defined as follows
\[\begin{equation} \mathrm{spacing} = \frac{1}{N} \sum_{i=1}^N (d_i - \bar{d})^2, \qquad \bar{d} = \frac{1}{N} \sum_{i=1}^N d_i, \qquad d_i = \min_{i \neq j} \rho(y^{(i)}, y^{(j)}). \end{equation}\]- Parameters:
solutions (list)
Note
For IGD and FD, these two indicators rely that the true Pareto front \(Z\) is known. And for the second part of indicators, these indicators measure the quality of a single solution \(y\) with a given preference vector \(\lambda\).
- compute_igd(solutions, Z)
Inverted(GD) indicator indicator, measuring the average distance
\[\begin{align*} \operatorname{IGD}(\mathbb{S})= \frac{1}{|\mathbb{Z}|}\left( \sum_{i=1}^{|\mathbb{Z}|} \min_{y' \in \mathbb{Z}} \rho(y^{(i)}, y') ^{2} \right)^{1/2}, \end{align*}\]where \(\mathbb{Z}\) is a reference set
- Parameters:
solutions (list)
Z (list)
- compute_fd(solutions, Z)
Fill Distance(FD) is the covering radius of a set of solutions:math:mathbb{S}
\[\begin{equation} \mathrm{FD}(\mathbb{A}) = \max_{y' \in \mathbb{Z}} \min_{y \in \mathbb{A}} \rho(y, y'). \end{equation}\]- Parameters:
solutions (list)
Z (list)
Note
In the following part, we introduce indicators related to preference vectors \(\lambda\):
- compute_pbi(y, \lambda)
The Penalty-based Intersection (PBI) indicator, which represents a weighted sum of distance functions \(d_1`$\) and $d_2$. It is given by \(\mathrm{PBI} = d_1 + \mu d_2\), where
\[\begin{equation} d_1 = \frac{\langle y - z, \lambda \rangle}{\lVert \lambda \rVert}, \qquad d_2 = \lVert y - (d_1\lambda + z) \rVert. \end{equation}\]- Parameters:
y (list)
lambda (list)
- compute_inner_product(y, \lambda)
- The inner product indicator,
- \[\begin{equation} \mathrm{Ip} = \langle y, \lambda \rangle, \end{equation}\]
measures the alignment of objective \(y\) with preference vector \(\lambda\).
- Parameters:
y (list)
lambda (list)
- compute_cross_angle(y, \lambda)
- TFor bi-objective problems, the cross angle indicator,
- \[\begin{equation} \vartheta = \lVert \arctan(y_2 / y_1) - \arctan(\lambda_2 / \lambda_1) \rVert \end{equation}\]
measures the alignment of objective \(y\) with preference vector \(\lambda\).
- Parameters:
y (list)
lambda (list)