pymcdm.correlations
- pymcdm.correlations.draws(x, y)
Calculate drastic WS distance between the ranking vectors. Rankings should be presented as indices, i.e. for the ranking A2 > A1 > A3 the ranking vector should be [2, 1, 3].
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Drastic distance between two rankings vectors.
- Return type:
float
- pymcdm.correlations.goodman_kruskal_gamma(x, y)
Calculate Goodman’s and Kruskal’s Gamma correlation between two ranking vectors.
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
- pymcdm.correlations.kendall_tau(x, y)
Calculate Kendall Tau correlation between two rankings vectors.
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
- pymcdm.correlations.pearson(x, y)
Calculate Pearson correlation between two raw vectors.
- Parameters:
x (ndarray) – First vector with raw values.
y (ndarray) – Second vector with raw values.
- Returns:
Correlation between two vectors.
- Return type:
float
- pymcdm.correlations.r(x, y)
Calculate Pearson correlation between two raw vectors.
- Parameters:
x (ndarray) – First vector with raw values.
y (ndarray) – Second vector with raw values.
- Returns:
Correlation between two vectors.
- Return type:
float
- pymcdm.correlations.rank_similarity_coef(x, y)
Calculate Rank Similarity Coefficient (WS) between two ranking vectors.
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
- pymcdm.correlations.rs(x, y)
Calculate Spearman correlation between two rankings vectors.
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
- pymcdm.correlations.rw(x, y)
Calculate Weighted Spearman correlation between two rankings vectors.
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
- pymcdm.correlations.spearman(x, y)
Calculate Spearman correlation between two rankings vectors.
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
- pymcdm.correlations.weighted_spearman(x, y)
Calculate Weighted Spearman correlation between two rankings vectors.
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
- pymcdm.correlations.ws(x, y)
Calculate Rank Similarity Coefficient (WS) between two ranking vectors.
- Parameters:
x (ndarray) – First vector of ranks.
y (ndarray) – Second vector of ranks.
- Returns:
Correlation between two rankings vectors.
- Return type:
float
- pymcdm.correlations.wsc(w0, w1)
Weights similarity coefficient for measuring the similarity between the criteria weights.
- 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
- 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).
- 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