pyrepo_mcda.mcda_methods.daria ============================== .. py:module:: pyrepo_mcda.mcda_methods.daria Classes ------- .. autoapisummary:: pyrepo_mcda.mcda_methods.daria.DARIA Module Contents --------------- .. py:class:: DARIA Data vARIability Assessment (DARIA) method for analyzing variability and temporal changes in alternative preferences. .. py:method:: _gini(R) Calculate variability values measured by the Gini coefficient in scores obtained by each evaluated option. Parameters ----------- R : ndarray 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) .. py:method:: _entropy(R) Calculate variability values measured by the Entropy in scores obtained by each evaluated option. Parameters ----------- R : ndarray 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) .. py:method:: _std(R) Calculate variability values measured by the Standard Deviation in scores obtained by each evaluated option. Parameters ----------- R : ndarray 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) .. py:method:: _stat_var(X) Calculate variability values measured by the Statistical Variance in scores obtained by each evaluated option. Parameters ---------- R : ndarray 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) .. py:method:: _coeff_var(X) Calculate variability values measured by the Coefficient of Variation in scores obtained by each evaluated option. Parameters ---------- R : ndarray 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) .. py:method:: _direction(R, preference_type=1) Determine the direction of the variability of alternatives scores obtained in the following periods of time. Parameters ---------- R : ndarray Matrix with preference values obtained with MCDA method (for example, TOPSIS) with `t` periods of time in rows and `m` alternatives in columns. preference_type : int 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_list : list 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_class : ndarray 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) .. py:method:: _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 ---------- scores : ndarray Vector with preference values of alternatives from the most recent year analyzed obtained by chosen MCDA method. variability : ndarray Vector with variability values of alternatives preferences obtained in investigated periods. direction : ndarray 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)