pyrepo_mcda.mcda_methods.promethee
Classes
Module Contents
- class pyrepo_mcda.mcda_methods.promethee.PROMETHEE_II
Bases:
pyrepo_mcda.mcda_methods.mcda_method.MCDA_method- __call__(matrix, weights, types, preference_functions=None, p=None, q=None)
- _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.
- pndarray
Vector with values representing the threshold of absolute preference.
- qndarray
Vector with values representing the threshold of indifference.
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)