saealib.EpsilonDominanceComparator#
- class saealib.EpsilonDominanceComparator(eps, mode='additive', direction=None, *, eps_cv=1e-06, eps_obj=1e-06, sorter=<function non_dominated_sort>)[ソース]#
ベースクラス:
ParetoComparatorComparator using ε-box dominance instead of standard Pareto dominance.
Wraps
EpsilonDominatorand injects it into theParetoComparatordominance seam via thedominator=argument. Front ranking, infeasibility handling, and constraint-domination logic are all inherited unchanged fromParetoComparator.The ε-dominance relation is defined in:
Laumanns, M., Thiele, L., Deb, K., & Zitzler, E. (2002). Combining convergence and diversity in evolutionary multiobjective optimization. Evolutionary Computation, 10(3), 263-282.
Each objective axis is divided into ε-boxes of width
eps. Two solutions that fall in the same ε-box are mutually non-dominating; a solution whose box index is strictly better in every objective dominates the other. Aseps → 0the relation recovers ordinary Pareto dominance.注釈
ε-box representative selection (the archive rule that keeps one solution per box — cf. Deb, Mohan & Mishra (2005), ε-MOEA) is not handled here. That is an archive-truncation responsibility and will be added separately.
- パラメータ:
eps (float or np.ndarray) -- Box size(s). A scalar broadcasts to all objectives; an array of shape
(n_obj,)sets per-objective widths. All values must be strictly positive (> 0).mode ({"additive", "multiplicative"}) -- Quantization mode passed to
EpsilonDominator."additive"(default): box index =floor(f_i / eps_i)."multiplicative": box index =floor(log f_i / log(1 + eps_i)); requires strictly positive objective values.direction (np.ndarray or None) -- See
ParetoComparator.eps_cv (float) -- See
ParetoComparator.eps_obj (float) -- See
ParetoComparator.sorter (NonDominatedSorter) -- See
ParetoComparator.
Methods
Compare two solutions directly without a Population object. |
|
Compare via Pareto dominance; -1=a dominates, 1=b dominates, 0=equal. |
|
Return population attributes this comparator needs to persist. |
|
Freshly recompute and materialize population-relative ranking state. |
|
Prepare population-relative ranking state, then sort. |
|
Sort by Pareto front rank; infeasible individuals come last. |
Method Details
- EpsilonDominanceComparator.__init__(eps, mode='additive', direction=None, *, eps_cv=1e-06, eps_obj=1e-06, sorter=<function non_dominated_sort>)[ソース]#
- パラメータ:
eps (float | ndarray)
mode (str)
direction (ndarray | None)
eps_cv (float)
eps_obj (float)
sorter (NonDominatedSorter)
- EpsilonDominanceComparator.compare(fa, cv_a, fb, cv_b)#
Compare two solutions directly without a Population object.
- パラメータ:
fa (ndarray)
cv_a (float)
fb (ndarray)
cv_b (float)
- 戻り値の型:
int
- EpsilonDominanceComparator.compare_population(population, idx_a, idx_b)#
Compare via Pareto dominance; -1=a dominates, 1=b dominates, 0=equal.
- パラメータ:
population (Population)
idx_a (int)
idx_b (int)
- 戻り値の型:
int
- EpsilonDominanceComparator.get_required_attrs(problem)#
Return population attributes this comparator needs to persist.
Population-relative ranking state (e.g. SPEA2 fitness) that must survive across selections belongs here as a named, typed attribute rather than in the population's transient cache. Default: no additional attributes.
- パラメータ:
problem (Problem) -- The optimization problem.
- 戻り値:
Empty by default.
- 戻り値の型:
list[PopulationAttribute]
- EpsilonDominanceComparator.prepare_population(population)#
Freshly recompute and materialize population-relative ranking state.
Default is a no-op — comparators whose ranking depends only on per-individual values already stored in
f/cvdo not need this. Comparators that declare attributes viaget_required_attrs()should override this to recompute and write those attributes for the given population, unconditionally (not reusing any prior cached value).- パラメータ:
population (Population) -- The population to prepare ranking state for.
- 戻り値の型:
None
- EpsilonDominanceComparator.rank_population(population)#
Prepare population-relative ranking state, then sort.
Equivalent to calling
prepare_population()followed bysort_population(). Callers performing environmental selection on a freshly assembled pool (e.g. survivor selection merging population and offspring) should call this instead ofsort_population()directly, so any population-relative state declared viaget_required_attrs()is recomputed for the new set before ranking.- パラメータ:
population (Population) -- The population to rank.
- 戻り値:
Sorted population indices, as returned by
sort_population().- 戻り値の型:
np.ndarray
- EpsilonDominanceComparator.sort_population(population)#
Sort by Pareto front rank; infeasible individuals come last.
- パラメータ:
population (Population)
- 戻り値の型:
np.ndarray