pyrepo_mcda.mcda_methods.spotis =============================== .. py:module:: pyrepo_mcda.mcda_methods.spotis Classes ------- .. autoapisummary:: pyrepo_mcda.mcda_methods.spotis.SPOTIS Module Contents --------------- .. py:class:: SPOTIS Bases: :py:obj:`pyrepo_mcda.mcda_methods.mcda_method.MCDA_method` Stable Preference Ordering Towards Ideal Solution (SPOTIS) method for ranking alternatives according to their distances from the ideal solution defined within criterion bounds. .. py:method:: __call__(matrix, weights, types, bounds) Score alternatives provided in decision matrix `matrix` 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. bounds: ndarray Bounds is ndarray with 2 rows and number of columns equal to criteria number. Bounds contain minimum values in the first row and maximum values in the second row for each criterion. Minimum and maximum values for the same criterion cannot be the same. Returns -------- ndrarray Vector with preference values of each alternative. The best alternative has the lowest preference value. Examples ---------- >>> bounds_min = np.amin(matrix, axis = 0) >>> bounds_max = np.amax(matrix, axis = 0) >>> bounds = np.vstack((bounds_min, bounds_max)) >>> spotis = SPOTIS() >>> pref = spotis(matrix, weights, types, bounds) >>> rank = rank_preferences(pref, reverse = False) .. py:method:: _spotis(matrix, weights, types, bounds) :staticmethod: