skcriteria.core.dominance
module¶
Dominance helper for the DecisionMatrix object.
- class skcriteria.core.dominance.DecisionMatrixDominanceAccessor(dm)[source]¶
Bases:
AccessorABC
Calculate basic statistics of the decision matrix.
- bt()[source]¶
Compare on how many criteria one alternative is better than another.
bt = better-than.
- Returns
Where the value of each cell identifies on how many criteria the row alternative is better than the column alternative.
- Return type
pandas.DataFrame
- eq()[source]¶
Compare on how many criteria two alternatives are equal.
- Returns
Where the value of each cell identifies how many criteria the row and column alternatives are equal.
- Return type
pandas.DataFrame
- dominance(*, strict=False)[source]¶
Compare if one alternative dominates or strictly dominates another alternative.
In order to evaluate the dominance of an alternative a0 over an alternative a1, the algorithm evaluates that a0 is better in at least one criterion and that a1 is not better in any criterion than a0. In the case that
strict = True
it also evaluates that there are no equal criteria.- Parameters
strict (bool, default
False
) – If True, strict dominance is evaluated.- Returns
Where the value of each cell is True if the row alternative dominates the column alternative.
- Return type
pandas.DataFrame
- compare(a0, a1)[source]¶
Compare two alternatives.
It creates a summary data frame containing the comparison of the two alternatives on a per-criteria basis, indicating which of the two is the best value, or if they are equal. In addition, it presents a “Performance” column with the count for each case.
- dominated(*, strict=False)[source]¶
Which alternative is dominated or strictly dominated by at least one other alternative.
- Parameters
strict (bool, default
False
) – If True, strict dominance is evaluated.- Returns
Where the index indicates the name of the alternative, and if the value is is True, it indicates that this alternative is dominated by at least one other alternative.
- Return type
pandas.Series
- has_loops(*, strict=False)[source]¶
Retorna True si la matriz contiene loops de dominacia.
A loop is defined as if there are alternatives a0, a1 and ‘a2’ such that “a0 ≻ a1 ≻ a2 ≻ a0” if
strict=True
, or “a0 ≽ a1 ≽ a2 ≽ a0” ifstrict=False
- Parameters
strict (bool, default
False
) – If True, strict dominance is evaluated.- Returns
If True a loop exists.
- Return type
Notes
If the result of this method is True, the
dominators_of()
method raises aRecursionError
for at least one alternative.