saealib.EpsilonDominator#

class saealib.EpsilonDominator(eps, mode='additive')[source]#

Bases: Dominator

ε-dominance predicate (Laumanns et al., 2002).

Quantizes each objective into ε-boxes and applies ordinary Pareto dominance on the resulting integer box coordinates. Two solutions that fall in the same ε-box are mutually non-dominating; a solution in a strictly better box (lower box index in every minimization objective, higher in every maximization objective) dominates the other.

Two quantization modes are supported:

  • additive (default): box index = floor(f_i / eps_i). As eps → 0 the boxes shrink to individual points and the relation recovers ordinary Pareto dominance.

  • multiplicative: box index = floor(log f_i / log(1 + eps_i)). Requires strictly positive objective values (f > 0).

Parameters:
  • eps (float or np.ndarray) – Box width per objective. A scalar applies the same width to every objective; an array of shape (n_obj,) sets per-objective widths. All values must be strictly positive (> 0).

  • mode ({"additive", "multiplicative"}) – Quantization mode. Default is "additive".

Raises:
  • ValueError – If any element of eps is not strictly positive (≤ 0).

  • ValueError – If mode is not one of "additive" or "multiplicative".

Notes

Additive box rule:

b_i = floor(f_i / eps_i)

Multiplicative box rule (requires f_i > 0 for all i):

b_i = floor(log(f_i) / log(1 + eps_i))

Because log(1 + eps_i) = log1p(eps_i) is used internally, the multiplicative rule is numerically stable for small eps.

The dominance-matrix and one-vs-many computations delegate entirely to an internal ParetoDominator instance operating on the quantized box coordinates. This keeps the two required primitives consistent.

References

[6]: Laumanns, M., Thiele, L., Deb, K., & Zitzler, E. (2002). Combining Convergence and Diversity in Evolutionary Multiobjective Optimization. Evolutionary Computation, 10(3), 263-282.

Methods

__init__

dominance_matrix

Compute the NxN ε-dominance matrix.

dominates

Return True if fa dominates fb.

dominates_many

Quantize both sides into eps-box coordinates, delegate to ParetoDominator.

Method Details

EpsilonDominator.__init__(eps, mode='additive')[source]#
Parameters:
  • eps (float | ndarray)

  • mode (str)

Return type:

None

EpsilonDominator.dominance_matrix(f, direction=None)[source]#

Compute the NxN ε-dominance matrix.

Quantizes f into ε-box coordinates and delegates to ParetoDominator on those coordinates so that direction handling and the accumulation logic are not duplicated.

D[i, j] is True if row i ε-dominates row j.

Parameters:
  • f (np.ndarray) – Objective matrix. shape: (n, n_obj). Must contain no NaN values (callers are responsible for pre-filtering).

  • direction (np.ndarray or None) – Per-objective direction. None → minimize all.

Returns:

Boolean matrix of shape (n, n).

Return type:

np.ndarray

Raises:

ValueError – In multiplicative mode, if any element of f is ≤ 0.

EpsilonDominator.dominates(fa, fb, direction=None)#

Return True if fa dominates fb.

Derived from dominates_many with a single-row objective matrix. NaN values in fa always return False. NaN values in fb are treated as infinitely bad.

Parameters:
  • fa (np.ndarray) – Objective vectors. shape: (n_obj,)

  • fb (np.ndarray) – Objective vectors. shape: (n_obj,)

  • direction (np.ndarray or None) – Per-objective direction. None → minimize all.

Return type:

bool

EpsilonDominator.dominates_many(fa, f_matrix, direction=None)[source]#

Quantize both sides into eps-box coordinates, delegate to ParetoDominator.

Parameters:
  • fa (ndarray)

  • f_matrix (ndarray)

  • direction (ndarray | None)

Return type:

tuple[ndarray, ndarray]