pymcdm.correlations
- pymcdm.correlations.goodman_kruskal_gamma(x, y)
Calculate Goodman’s and Kruskal’s Gamma correlation between two ranking vectors [1].
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
Notes
If there are no comparable pairs (i.e., the denominator is zero), Gamma is undefined. In such cases, a UserWarning is emitted.
References
- pymcdm.correlations.kendall_tau(x, y)
Calculate Kendall Tau correlation between two rankings vectors [2].
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
References
[2] Kendall tau rank correlation coefficient, Wikipedia. Available at: https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient
- pymcdm.correlations.pearson(x, y)
Calculate Pearson correlation between two raw vectors [3].
- Parameters:
x (ndarray) – First vector with raw values.
y (ndarray) – Second vector with raw values.
- Returns:
Correlation between two vectors.
- Return type:
float
Notes
If either input vector has zero variance, the Pearson correlation is undefined. In such cases, a UserWarning is emitted. This function can also be used via its alias: r().
References
[3] “Pearson correlation coefficient”, Wikipedia, Available at: https://en.wikipedia.org/wiki/Pearson_correlation_coefficient
- pymcdm.correlations.r(x, y)
Alias to pymcdm.correlations.pearson() function.
- pymcdm.correlations.rank_similarity_coef(x, y)
Calculate Rank Similarity Coefficient (WS) between two ranking vectors [4].
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
Notes
This function can also be used via its alias: ws().
References
[4] Sałabun, W., & Urbaniak, K. (2020, June). A new coefficient of rankings similarity in decision-making problems. In International conference on computational science (pp. 632-645). Cham: Springer International Publishing.
- pymcdm.correlations.rs(x, y)
Alias to pymcdm.correlations.spearman() function.
- pymcdm.correlations.rw(x, y)
Alias to pymcdm.correlations.weighted_spearman() function.
- pymcdm.correlations.spearman(x, y)
Calculate Spearman correlation between two rankings vectors [5].
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
Notes
If either input vector has zero variance, the Spearman correlation is undefined. In such cases, a UserWarning is emitted. This function can also be used via its alias: rs().
References
[5] Spearman’s rank correlation coefficient, Wikipedia. Available at: https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient
- pymcdm.correlations.weighted_spearman(x, y)
Calculate Weighted Spearman correlation between two rankings vectors [6].
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
Notes
This function can also be used via its alias: rw().
References
[6] Pinto da Costa, J., & Soares, C. (2005). A weighted rank measure of correlation. Australian & New Zealand Journal of Statistics, 47(4), 515-529.
- pymcdm.correlations.ws(x, y)
Alias to pymcdm.correlations.rank_similarity_coef() function.
- pymcdm.correlations.wsc(w0, w1)
Weights similarity coefficient for measuring the similarity between the criteria weights [7].
- Parameters:
w0 (ndarray) – First vector of weights.
w1 (ndarray) – Second vector of weights.
- Returns:
The similarity of the weights in range [0, 1], where 0 is different weights, and 1 is the same weights.
- Return type:
float
References
[7] Shekhovtsov, A. (2023). Evaluating the performance of subjective weighting methods for multi-criteria decision-making using a novel weights similarity coefficient. Procedia Computer Science, 225, 4785-4794.
- pymcdm.correlations.wsc2(w0, w1)
Weights similarity coefficient for measuring the similarity between the criteria weights. This is symmetrical version, i.e. wsc2(a, b) == wsc2(b, a) [8].
- Parameters:
w0 (ndarray) – First vector of weights.
w1 (ndarray) – Second vector of weights.
- Returns:
The similarity of the weights in range [0, 1], where 0 is different weights, and 1 is the same weights.
- Return type:
float
References
[8] Shekhovtsov, A. (2023). Evaluating the performance of subjective weighting methods for multi-criteria decision-making using a novel weights similarity coefficient. Procedia Computer Science, 225, 4785-4794.