objective_weighting.additions
Module Contents
Functions
|
Rank alternatives according to MCDA preference function values. If more than one alternative |
- objective_weighting.additions.rank_preferences(pref, reverse=True)[source]
Rank alternatives according to MCDA preference function values. If more than one alternative have the same preference function value, they will be given the same rank value (tie).
- Parameters
pref (ndarray) – Vector with MCDA preference function values for alternatives
reverse (bool) – The boolean variable is True for MCDA methods that rank alternatives in descending order (for example, TOPSIS, CODAS) and False for MCDA methods that rank alternatives in ascending order (for example, VIKOR, SPOTIS)
- Returns
Vector with alternatives ranking. Alternative with 1 value is the best and has the first position in the ranking.
- Return type
ndarray
Examples
>>> rank = rank_preferences(pref, reverse = True)