pyrepo_mcda.mcda_methods.spotis

Classes

SPOTIS

Module Contents

class pyrepo_mcda.mcda_methods.spotis.SPOTIS

Bases: pyrepo_mcda.mcda_methods.mcda_method.MCDA_method

__call__(matrix, weights, types, bounds)

Score alternatives provided in decision matrix matrix using criteria weights and criteria types.

Parameters

matrixndarray

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)
static _spotis(matrix, weights, types, bounds)