pyrepo_mcda.mcda_methods.promethee

Classes

PROMETHEE_II

Preference Ranking Organization Method for Enrichment Evaluation II

Module Contents

class pyrepo_mcda.mcda_methods.promethee.PROMETHEE_II

Bases: pyrepo_mcda.mcda_methods.mcda_method.MCDA_method

Preference Ranking Organization Method for Enrichment Evaluation II (PROMETHEE II) for ranking alternatives based on positive, negative, and net preference flows.

__call__(matrix, weights, types, preference_functions=None, p=None, q=None)

Score alternatives from decision matrix matrix using criteria weights weights and criteria types types

Parameters

matrixndarray

decision matrix with performance values for m alternatives in rows and n criteria in columns

weightsndarray

matrix with criteria weights vectors with number of columns equal to number of columns n of matrix

typesndarray

vector with criteria types containing values of 1 for profit criteria and -1 for cost criteria with size equal to number of columns n of matrix

_usual_function(d, p, q)
_ushape_function(d, p, q)
_vshape_function(d, p, q)
_level_function(d, p, q)
_linear_function(d, p, q)
_gaussian_function(d, p, q)
static _promethee_II(self, matrix, weights, types, preference_functions, p, q)

Score alternatives provided in the decision matrix matrix using criteria weights and criteria types.

Parameters

matrixndarray

Decision matrix with m alternatives in rows and n criteria in columns.

weights: ndarray

Criteria weights. The sum of weights must be equal to 1.

types: ndarray

Criteria types. Profit criteria are represented by 1 and cost by -1.

preference_functionslist

List with methods containing preference functions for calculating the preference degree for each criterion. If None, default PROMETHEE preference function (usual) is applied.

pndarray

Vector with values representing the threshold of absolute preference. If None, default PROMETHEE preference thresholds are applied.

qndarray

Vector with values representing the threshold of indifference. If None, default PROMETHEE indifference thresholds are applied.

Returns

ndrarray

Preference values of each alternative. The best alternative has the highest preference value.

Examples

>>> promethee_II = PROMETHEE_II()
>>> preference_functions = [promethee_II._linear_function for pf in range(len(weights))]
>>> u = np.sqrt(np.sum(np.square(np.mean(matrix, axis = 0) - matrix), axis = 0) / matrix.shape[0])
>>> p = 2 * u
>>> q = 0.5 * u
>>> pref = promethee_II(matrix, weights, types, preference_functions, p = p, q = q)
>>> rank = rank_preferences(pref, reverse = True)