mrsort
This module implements the MR-Sort algorithm.
Implementation and naming conventions are taken from [LMP11].
- class MRSort(performance_table, criteria_weights, profiles, threshold, categories=None)
Bases:
Assignator,RankerThis class implements the MR-Sort algorithm.
- Parameters
performance_table (PerformanceTable[OrdinalScale]) –
criteria_weights (Dict[Any, float]) –
profiles (PerformanceTable[OrdinalScale]) – profiles in ascending dominance order
threshold (float) –
categories (Optional[List]) – categories in ascending ranking order
- Raises
ValueError –
if length of categories is not length of profiles + 1
if the profiles are not in ascending dominance order
if the profiles and performance table do not share the same scales
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
mcda.scales.QualitativeScaleif categories set, amcda.scales.DiscreteQuantitativeScalescale otherwise
Note
Implementation and naming conventions are taken from [LMP11].
New in version 1.1.0.
- assign(**kwargs)
Assign alternatives to categories.
- Returns
alternative assignments
- Return type
CommensurableValues[Union[DiscreteQuantitativeScale, QualitativeScale]]
Note
the category profiles defining the categories are the ones from
category_profiles
- rank(**kwargs)
Rank alternatives by their assigned ordered category.
- Returns
alternative assignments
- Return type
CommensurableValues[Union[DiscreteQuantitativeScale, QualitativeScale]]
Note
the category profiles defining the categories are the ones from
category_profilesSee also