pyrepo_mcda.mcda_methods.vmcm ============================= .. py:module:: pyrepo_mcda.mcda_methods.vmcm Classes ------- .. autoapisummary:: pyrepo_mcda.mcda_methods.vmcm.VMCM Module Contents --------------- .. py:class:: VMCM Bases: :py:obj:`pyrepo_mcda.mcda_methods.mcda_method.MCDA_method` Vector Measure Construction Method (VMCM) for evaluating and ranking alternatives using vector-based measures of their performance across multiple criteria. .. py:method:: _elimination(matrix) Calculate significance coefficient values for each criterion. Criteria with significance coefficient values between 0 and 0.1 are recommended to be eliminated from the considered criteria set. Parameters -------------- matrix : ndarray Decision matrix with m alternatives in rows and n criteria in columns. Examples -------------- >>> vmcm = VMCM() >>> vmcm._elimination(matrix) .. py:method:: _weighting(matrix) Calculate criteria weights Parameters ------------- matrix : ndarray Decision matrix with m alternatives in rows and n criteria in columns. Returns ------------- ndarray Vector with criteria weights Examples ------------ >>> vmcm = VMCM() >>> weights = vmcm._weighting(matrix) .. py:method:: _normalization(matrix) Calculates normalized matrix Parameters -------------- matrix : ndarray Decision matrix with m alternatives in rows and n criteria in columns. Returns --------------- ndarray Normalized matrix Examples --------------- >>> vmcm = VMCM() >>> norm_matrix = vmcm._normalization(matrix) .. py:method:: _pattern_determination(matrix, types) Automatic determination of pattern and anti-pattern Parameters -------------- matrix : ndarray Decision matrix with m alternatives in rows and n criteria in columns. Returns -------------- ndarray, ndarray Two vectors including values respectively of pattern and anti-pattern Examples -------------- >>> vmcm = VMCM() >>> pattern, antipattern = vmcm._pattern_determination(matrix, types) .. py:method:: _classification(m) Assign evaluated objects to classes Parameters ------------- m : ndarray Vector with values of synthetic measure Returns ------------- ndarray Vector including classes assigned to evaluated objects Examples -------------- >>> vmcm = VMCM() >>> pref = vmcm(matrix, weights, types) >>> classes = vmcm._classification(pref) .. py:method:: __call__(matrix, weights, types, pattern, anti_pattern) Score alternatives provided in decision matrix `matrix` with m alternatives in rows and n criteria in columns 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. pattern : ndarray Vector with values of pattern anti_pattern : ndarray Vector with values of anti-pattern Returns ------- ndrarray Vector with preference values of each alternative. The best alternative has the highest preference value. Examples --------- >>> vmcm = VMCM() >>> pattern, antipattern = vmcm._pattern_determination(matrix, types) >>> pref = vmcm(matrix, weights, types, pattern, antipattern) >>> rank = rank_preferences(pref, reverse = True) .. py:method:: _vmcm(self, matrix, weights, types, pattern, anti_pattern) :staticmethod: