saealib.ParetoDominator#
- class saealib.ParetoDominator[ソース]#
ベースクラス:
DominatorPareto dominance predicate.
fadominatesfbifffais at most as large asfbin 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
Compute the NxN Pareto-dominance matrix. |
|
Return True if fa dominates fb. |
|
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-objectiveleq_all/less_anycomparisons. 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_manywith 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]