skcriteria.madm.similarity module

Methods based on a similarity between alternatives.

skcriteria.madm.similarity.topsis(matrix, objectives, weights, metric='euclidean', **kwargs)[source]

Execute TOPSIS without any validation.

class skcriteria.madm.similarity.TOPSIS(*, metric='euclidean')[source]

Bases: skcriteria.madm._base.SKCDecisionMakerABC

The Technique for Order of Preference by Similarity to Ideal Solution.

TOPSIS is based on the concept that the chosen alternative should have the shortest geometric distance from the ideal solution and the longest euclidean distance from the worst solution.

An assumption of TOPSIS is that the criteria are monotonically increasing or decreasing, and also allow trade-offs between criteria, where a poor result in one criterion can be negated by a good result in another criterion.


metric (str or callable, optional) – The distance metric to use. If a string, the distance function can be braycurtis, canberra, chebyshev, cityblock, correlation, cosine, dice, euclidean, hamming, jaccard, jensenshannon, kulsinski, mahalanobis, matching, minkowski, rogerstanimoto, russellrao, seuclidean, sokalmichener, sokalsneath, sqeuclidean, wminkowski, yule.



If some objective is to minimize.


[Hwang & Yoon, 1981] [Wikipedia contributors, 2021a] [Tzeng & Huang, 2011]

property metric

Which distance metric will be used.