crispyn.mcda_methods
Submodules
Classes
Helper class that provides a standard way to create an ABC using |
|
Package Contents
- class crispyn.mcda_methods.VIKOR(normalization_method=None, v=0.5)
Bases:
crispyn.mcda_methods.mcda_method.MCDA_methodHelper class that provides a standard way to create an ABC using inheritance.
- v = 0.5
- normalization_method = None
- __call__(matrix, weights, types)
Score alternatives provided in 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
Matrix containing vectors with criteria weights in subsequent rows. Sum of weights in each vector must be equal to 1.
- types: ndarray
Vector with criteria types. Profit criteria are represented by 1 and cost by -1.
Returns
- ndrarray
Matrix with vectors containing preference values of each alternative. The best alternative has the lowest preference value. Vectors are placed in subsequent columns of matrix.
Examples
>>> vikor = VIKOR(normalization_method = minmax_normalization) >>> pref = vikor(matrix, weights, types) >>> rank = np.zeros((pref.shape)) >>> for i in range(pref.shape[1]): >>> rank[:, i] = rank_preferences(pref[:, i], reverse = False)
- static _vikor(matrix, weights, types, normalization_method, v)
- class crispyn.mcda_methods.VIKOR_SMAA(normalization_method=None, v=0.5)
- v = 0.5
- normalization_method = None
- __call__(matrix, weights, types)
Score alternatives provided in decision matrix matrix using criteria weights and criteria types.
Parameters
- matrixndarray
Decision matrix with m alternatives in rows and n criteria in columns.
- weightsndarray
Matrix with i vectors in rows of n weights in columns. i means number of iterations of SMAA
- typesndarray
Vector with criteria types. Profit criteria are represented by 1 and cost by -1.
Returns
- ndrarray, ndarray, ndarray
Matrix with acceptability indexes values for each alternative in rows in relation to each rank in columns, Matrix with central weight vectors for each alternative in rows Matrix with final ranking of alternatives
Examples
>>> vikor_smaa = VIKOR_SMAA(normalization_method = minmax_normalization) >>> rank_acceptability_index, central_weight_vector, rank_scores = vikor_smaa(matrix, weights, types)
- _generate_weights(n, iterations)
Function to generate multiple weight vectors
Parameters
- nint
Number of criteria
- iterationsint
Number of weight vector to generate
Returns
- ndarray
Matrix containing in rows vectors with weights for n criteria
- static _vikor_smaa(self, matrix, weights, types, normalization_method, v)