electre
This module implements the Electre algorithms.
Implementation and naming conventions are taken from [Vin98a].
- class Electre1(performance_table, criteria_weights, concordance_threshold, veto_thresholds)
Bases:
IElectre1[AdjacencyValueMatrix[DiscreteQuantitativeScale]],SelectorThis class implements the Electre I algorithm.
- Parameters
performance_table (PerformanceTable[QuantitativeScale]) –
criteria_weights (Dict[Any, float]) –
concordance_threshold (float) –
veto_thresholds (Dict[Any, float]) –
- concordance()
Compute the concordance matrix.
- Returns
concordance matrix
- Return type
- construct()
Construct the outranking matrix using Electre I method.
- Returns
the outranking matrix of the performance table
- Return type
- discordance()
Compute the discordance matrix.
- Returns
discordance matrix
- Return type
- exploit(outranking_structure, cycle_reduction=False, transitivity=False, **kwargs)
Choose best alternative candidates from outranking matrix.
It uses
OutrankingMatrix.kernel()to find the best candidates.- Parameters
outranking_structure (AdjacencyValueMatrix[DiscreteQuantitativeScale]) –
cycle_reduction (bool) – if
True, applyAdjacencyMatrix.cycle_reduction_matrixto outranking matrixtransitivity (bool) – if
True, applyAdjacencyMatrix.transitive_closureto outranking matrix
- Returns
best alternative candidates
- Return type
List
Warning
if outranking_matrix kernel does not exist, it returns all alternatives
- outranking(concordance_matrix, discordance_matrix)
Compute the outranking matrix using Electre I method.
- Parameters
concordance_matrix (AdjacencyValueMatrix[QuantitativeScale]) – concordance matrix
discordance_matrix (PartialValueMatrix[QuantitativeScale]) – discordance matrix
- Returns
the outranking matrix
- Return type
- select(cycle_reduction=False, transitivity=False, **kwargs)
Compute the outranking matrix using Electre I method.
- Parameters
cycle_reduction (bool) – if
True, applyAdjacencyMatrix.cycle_reduction_matrixto outranking matrixtransitivity (bool) – if
True, applyAdjacencyMatrix.transitive_closureto outranking matrix
- Returns
best alternative candidates
- Return type
List
Warning
if outranking_matrix kernel does not exist, it returns all alternatives
- class Electre2(performance_table, criteria_weights, weak_concordance_threshold, strong_concordance_threshold, weak_veto_thresholds, strong_veto_thresholds)
Bases:
IElectre1[Tuple[AdjacencyValueMatrix[DiscreteQuantitativeScale],AdjacencyValueMatrix[DiscreteQuantitativeScale]]],RankerThis class implements the Electre II algorithm.
- Parameters
performance_table (PerformanceTable[QuantitativeScale]) –
criteria_weights (Dict[Any, float]) –
weak_concordance_threshold (float) –
strong_concordance_threshold (float) –
weak_veto_thresholds (Dict[Any, float]) –
strong_veto_thresholds (Dict[Any, float]) –
- concordance()
Compute the concordance matrix.
- Returns
concordance matrix
- Return type
- construct()
Compute strong and weak dominance outranking matrices.
- Returns
strong outranking matrix, weak outranking matrix
- Return type
Tuple[AdjacencyValueMatrix[DiscreteQuantitativeScale], AdjacencyValueMatrix[DiscreteQuantitativeScale]]
- discordance()
Compute the discordance matrix.
- Returns
discordance matrix
- Return type
- classmethod distillation(strong_outranking_matrix, weak_outranking_matrix, ascending=False)
Compute distillation using outranking matrices.
- Parameters
strong_outranking_matrix (AdjacencyValueMatrix[DiscreteQuantitativeScale]) –
weak_outranking_matrix (AdjacencyValueMatrix[DiscreteQuantitativeScale]) –
ascending (bool) – if
Truedistillation is done in ascending direction
- Returns
resulting ranking as an outranking matrix
- Return type
- exploit(outranking_structure, **kwargs)
Compute distillations and merge results.
- Parameters
outranking_structure (Tuple[AdjacencyValueMatrix[DiscreteQuantitativeScale], AdjacencyValueMatrix[DiscreteQuantitativeScale]]) – strong and weak outranking matrices
- Returns
result outranking matrix
- Return type
- outranking(concordance_matrix, discordance_matrix, strong=True)
Calculate the outranking matrix according to given thresholds.
- Parameters
concordance_matrix (AdjacencyValueMatrix[QuantitativeScale]) – concordance matrix
discordance_matrix (PartialValueMatrix[QuantitativeScale]) – discordance matrix
strong (bool) – return strong outranking matrix if
True, weak otherwise
- Returns
outranking matrix
- Return type
- rank(**kwargs)
Compute final outranking matrix for Electre II.
- Parameters
performance_table –
- Returns
result outranking matrix
- Return type
- class Electre3(performance_table, criteria_weights, indifference_thresholds, preference_thresholds, veto_thresholds, alpha=0.3, beta=-0.15)
-
This class implements the Electre III algorithm.
- Parameters
performance_table (PerformanceTable[QuantitativeScale]) –
criteria_weights (Dict[Any, float]) –
indifference_thresholds (Dict[Any, float]) –
preference_thresholds (Dict[Any, float]) –
veto_thresholds (Dict[Any, float]) –
alpha (float) – preset up values of distillation coefficients
beta (float) – preset up values of distillation coefficients
- concordance(performance_table=None)
Compute the concordance matrix.
- Parameters
performance_table (Optional[PerformanceTable[QuantitativeScale]]) – use
performance_tableattribute if not provided- Returns
concordance matrix
- Return type
- construct()
Construct outranking structure which is the credibility matrix.
- Returns
credibility matrix
- Return type
- credibility(performance_table=None)
Compute the credibility matrix.
- Parameters
performance_table (Optional[PerformanceTable[QuantitativeScale]]) – use
performance_tableattribute if not provided- Returns
credibility matrix
- Return type
- discordance(performance_table=None)
Compute the discordance matrix.
- Parameters
performance_table (Optional[PerformanceTable[QuantitativeScale]]) – use
performance_tableattribute if not provided- Returns
discordance matrix
- Return type
- distillation(credibility_matrix, ascending=False)
Compute distillation.
- Parameters
credibility_matrix (AdjacencyValueMatrix[QuantitativeScale]) –
ascending (bool) – if
Truedistillation is performed in ascension
- Returns
ranking of categories
- Return type
- exploit(outranking_structure, **kwargs)
Compute the complete Electre III exploitation phase.
- Parameters
outranking_structure (AdjacencyValueMatrix[QuantitativeScale]) – credibility matrix
- Returns
final outranking matrix
- Return type
- qualification(credibility_mat)
Compute the qualification for each pair of alternatives a and b.
- Parameters
credibility_mat (AdjacencyValueMatrix[QuantitativeScale]) –
- Returns
qualifications
- Return type
Series
- rank(**kwargs)
Compute the complete Electre III algorithm
- Returns
final outranking matrix
- Return type
- class ElectreTri(performance_table, criteria_weights, profiles, indifference_thresholds, preference_thresholds, veto_thresholds, lambda_, categories=None)
Bases:
IElectre3,Assignator,RankerThis class implements the Electre-Tri B algorithm.
- Parameters
performance_table (PerformanceTable[QuantitativeScale]) –
criteria_weights (Dict[Any, float]) –
profiles (PerformanceTable[QuantitativeScale]) – profiles in ascending dominance order
indifference_thresholds (Dict[Any, float]) –
preference_thresholds (Dict[Any, float]) –
veto_thresholds (Dict[Any, float]) –
lambda – cut level
categories (Optional[List]) – categories in ascending ranking order
lambda_ (float) –
- Raises
ValueError –
if length of categories is not length of profiles + 1
if the profiles are not in ascending dominance order
IndexError – if profiles and alternatives share some labels
- Attr category_profiles
category profiles formed using categories and profiles
- Attr categories
ordered categories defined as a qualitative scale
Note
Implementation and naming conventions are taken from [Vin98b].
- assign(pessimistic=False, **kwargs)
Assign alternatives to categories.
- Parameters
pessimistic (bool) –
- Returns
alternative assignments
- Return type
Note
the category profiles defining the categories are the ones from
category_profiles
- concordance(performance_table=None)
Compute the concordance matrix.
- Parameters
performance_table (Optional[PerformanceTable[QuantitativeScale]]) – use
performance_tableattribute if not provided- Returns
concordance matrix
- Return type
- construct()
Construct alternatives and profiles credibility matrix.
Returned credibility matrix concatenates
performance_tableandprofiles(in that order).- Returns
- Return type
- credibility(performance_table=None)
Compute the credibility matrix.
- Parameters
performance_table (Optional[PerformanceTable[QuantitativeScale]]) – use
performance_tableattribute if not provided- Returns
credibility matrix
- Return type
- discordance(performance_table=None)
Compute the discordance matrix.
- Parameters
performance_table (Optional[PerformanceTable[QuantitativeScale]]) – use
performance_tableattribute if not provided- Returns
discordance matrix
- Return type
- exploit(outranking_structure, pessimistic=False, **kwargs)
Compute the exploitation procedure (either optimistically or pessimistically).
- Parameters
outranking_structure (AdjacencyValueMatrix[QuantitativeScale]) – credibility matrix
pessimistic (bool) – if
Trueperforms procedure pessimistically
- Returns
alternative assignments
- Return type
Note
the category profiles defining the categories are the ones from
category_profiles
- rank(pessimistic=False, **kwargs)
Rank alternatives by their assigned ordered category.
- Parameters
pessimistic (bool) –
- Returns
alternative assignments
- Return type
Note
the category profiles defining the categories are the ones from
category_profilesSee also