Distribution metrics#

namespace metrics

Metrics that can be used to track certain attributes of GA throughout a run.

class NadirPoint#

#include <metrics/distribution_metrics.hpp>
class NadirPoint : public gapp::metrics::Monitor<NadirPoint, FitnessMatrix>#

Record the nadir point of the population’s fitness values in each generation. This metric is intended for multi-objective problems, but it also works for single-objective problems, where it will be equivalent to the FitnessMax metric.

class Hypervolume#

#include <metrics/distribution_metrics.hpp>
class Hypervolume : public gapp::metrics::Monitor<Hypervolume, std::vector<double>>#

Record the hypervolume of the population’s fitness values in each generation relative to some reference point. The coordinates of this reference point should be less than any fitness value it will be compared to (ie. the worst point of the objective space).

This metric is intended for multi-objective problems, but it also works for single-objective ones.

Note

This metric can be computationally expensive for large populations and dimensions.

Public Functions

explicit Hypervolume(FitnessVector ref_point) noexcept#

Create a hypervolume metric.

Parameters:

ref_point – The reference point that will be used to calculate the hypervolume. The size of this point should match the number of objectives of the fitness functions, and it should be dominated by every point in the objective space that it will be compared to.

inline const FitnessVector &ref_point() const noexcept#
Returns:

The reference point used for computing the hypervolumes.

class AutoHypervolume#

#include <metrics/distribution_metrics.hpp>
class AutoHypervolume : public gapp::metrics::Monitor<AutoHypervolume, std::vector<double>>#

Record the hypervolume of the population’s fitness values in each generation. The reference point used for the calculation of the hypervolumes is determined automatically as the objective-wise worst point encountered by the GA throughout the run.

While the reference point will be updated throughout a run, the old hypervolume values will also be updated along with it, so every generation’s hypervolume is computed relative to the same reference point.

This metric is intended for multi-objective problems, but it also works for single-objective ones.

Note

This metric can be computationally expensive for large populations and dimensions.

Public Functions

inline const FitnessVector &ref_point() const noexcept#
Returns:

The reference point used for computing the hypervolumes.