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, Ranker

This class implements the MR-Sort algorithm.

Parameters
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.QualitativeScale if categories set, a mcda.scales.DiscreteQuantitativeScale scale 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_profiles

See also

assign()