pyrepo_mcda.mcda_methods.daria
Classes
Data vARIability Assessment (DARIA) method for analyzing variability |
Module Contents
- class pyrepo_mcda.mcda_methods.daria.DARIA
Data vARIability Assessment (DARIA) method for analyzing variability and temporal changes in alternative preferences.
- _gini(R)
Calculate variability values measured by the Gini coefficient in scores obtained by each evaluated option.
Parameters
- Rndarray
Matrix with preference values obtained with MCDA method (for example, TOPSIS) with t periods of time in rows and m alternatives in columns.
Returns
- ndarray
Vector with Gini coefficient values for each alternative.
Examples
>>> daria = DARIA() >>> variability = daria._gini(matrix)
- _entropy(R)
Calculate variability values measured by the Entropy in scores obtained by each evaluated option.
Parameters
- Rndarray
Matrix with preference values obtained with MCDA method (for example, TOPSIS) with t periods of time in rows and m alternatives in columns.
Returns
- ndarray
Vector with Entropy values for each alternative.
Examples
>>> daria = DARIA() >>> variability = daria._entropy(matrix)
- _std(R)
Calculate variability values measured by the Standard Deviation in scores obtained by each evaluated option.
Parameters
- Rndarray
Matrix with preference values obtained with MCDA method (for example, TOPSIS) with t periods of time in rows and m alternatives in columns.
Returns
- ndarray
Vector with Standard Deviation values for each alternative.
Examples
>>> daria = DARIA() >>> variability = daria._std(matrix)
- _stat_var(X)
Calculate variability values measured by the Statistical Variance in scores obtained by each evaluated option.
Parameters
- Rndarray
Matrix with preference values obtained with MCDA method (for example, TOPSIS) with t periods of time in rows and m alternatives in columns.
Returns
- ndarray
Vector with Statistical Variance values for each alternative.
Examples
>>> daria = DARIA() >>> variability = daria._stat_var(matrix)
- _coeff_var(X)
Calculate variability values measured by the Coefficient of Variation in scores obtained by each evaluated option.
Parameters
- Rndarray
Matrix with preference values obtained with MCDA method (for example, TOPSIS) with t periods of time in rows and m alternatives in columns.
Returns
- ndarray
Vector with Coefficient of Variation values for each alternative.
Examples
>>> daria = DARIA() >>> variability = daria._coeff_var(matrix)
- _direction(R, preference_type=1)
Determine the direction of the variability of alternatives scores obtained in the following periods of time.
Parameters
- Rndarray
Matrix with preference values obtained with MCDA method (for example, TOPSIS) with t periods of time in rows and m alternatives in columns.
- preference_typeint
The variable represents the ordering of alternatives by the MCDA method. It can be equal to 1 or -1. 1 means that the MCDA method sorts options in descending order according to preference values (for example, the TOPSIS method). -1 means that the MCDA method sorts options in ascending order according to preference values (for example, the VIKOR method).
Returns
- direction_listlist
List with strings representing the direction of variability in the form of the arrow up for improvement, arrow down for worsening, and = for stability. It is useful for results presentation.
- dir_classndarray
Vector with numerical values representing the direction of variability. 1 represents increasing preference values, and -1 means decreasing preference values. It is used to calculate final aggregated preference values using DARIA method in next stage of DARIA method.
Examples
>>> daria = DARIA() >>> dir_list, dir_class = daria._direction(matrix, preference_type)
- _update_efficiency(scores, variability, direction)
Calculate final aggregated preference values of alternatives of DARIA method. Obtained preference values can be sorted according to chosen MCDA method rule to generate ranking of alternatives.
Parameters
- scoresndarray
Vector with preference values of alternatives from the most recent year analyzed obtained by chosen MCDA method.
- variabilityndarray
Vector with variability values of alternatives preferences obtained in investigated periods.
- directionndarray
Vector with numerical values of the direction of variability in values of alternatives preferences obtained in investigated periods. 1 represents increasing in following preference values, and -1 means decreasing in following preference values.
Returns
- ndarray
Final aggregated preference values of alternatives considering variability in preference values obtained in the following periods.
Examples
>>> updated_scores = daria._update_efficiency(scores, variability, direction) >>> rank = rank_preferences(updated_scores, reverse = True)