saealib.ParetoDominator#

class saealib.ParetoDominator[ソース]#

ベースクラス: Dominator

Pareto dominance predicate.

fa dominates fb iff fa is at most as large as fb in all objectives and strictly smaller in at least one (after applying the direction transform).

This is the default dominance relation used throughout the library.

Methods

__init__

dominance_matrix

Compute the NxN Pareto-dominance matrix.

dominates

Return True if fa dominates fb.

dominates_many

Compute one-vs-many Pareto dominance via a single O(n) broadcast.

Method Details

ParetoDominator.__init__()#
ParetoDominator.dominance_matrix(f, direction=None)[ソース]#

Compute the NxN Pareto-dominance matrix.

Applies the f * (-direction) transform so that smaller is always better, then accumulates per-objective leq_all / less_any comparisons. Peak memory is O(N²); no (N, N, M) tensor is created.

パラメータ:
  • f (np.ndarray) -- Objective matrix. shape: (n, n_obj). Must contain no NaN values.

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

戻り値:

Boolean matrix of shape (n, n). D[i, j] = True iff row i Pareto-dominates row j.

戻り値の型:

np.ndarray

ParetoDominator.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.

パラメータ:
  • 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.

戻り値の型:

bool

ParetoDominator.dominates_many(fa, f_matrix, direction=None)[ソース]#

Compute one-vs-many Pareto dominance via a single O(n) broadcast.

パラメータ:
  • fa (np.ndarray) -- shape: (n_obj,)

  • f_matrix (np.ndarray) -- shape: (n, n_obj). Must contain no NaN values.

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

戻り値:

(fa_dominates, dominates_fa), each shape (n,).

戻り値の型:

tuple[np.ndarray, np.ndarray]