pyrepo_mcda.mcda_methods.codas ============================== .. py:module:: pyrepo_mcda.mcda_methods.codas Classes ------- .. autoapisummary:: pyrepo_mcda.mcda_methods.codas.CODAS Module Contents --------------- .. py:class:: CODAS(normalization_method=linear_normalization, distance_metric=euclidean, tau=0.02) Bases: :py:obj:`pyrepo_mcda.mcda_methods.mcda_method.MCDA_method` Combinative Distance-based Assessment (CODAS) method for ranking alternatives based on their distances from the negative ideal solution. .. py:attribute:: normalization_method .. py:attribute:: distance_metric .. py:attribute:: tau :value: 0.02 .. py:method:: __call__(matrix, weights, types) Score alternatives provided in decision matrix `matrix` with m alternatives and n criteria using criteria `weights` and criteria `types`. Parameters ----------- matrix : ndarray Decision matrix with m alternatives in rows and n criteria in columns. weights: ndarray Vector with criteria weights. Sum of weights must be equal to 1. types: ndarray Vector with criteria types. Profit criteria are represented by 1 and cost by -1. Returns -------- ndrarray Vector with preference values of each alternative. The best alternative has the highest preference value. Examples ---------- >>> codas = CODAS(normalization_method = linear_normalization, distance_metric = euclidean, tau = 0.02) >>> pref = codas(matrix, weights, types) >>> rank = rank_preferences(pref, reverse = True) .. py:method:: _psi(x) .. py:method:: _codas(self, matrix, weights, types, normalization_method, distance_metric) :staticmethod: