objective_weighting.correlations
Module Contents
Functions
|
Calculate Spearman rank correlation coefficient between two vectors |
|
Calculate Weighted Spearman rank correlation coefficient between two vectors |
|
Calculate Pearson correlation coefficient between two vectors |
- objective_weighting.correlations.spearman(R, Q)[source]
Calculate Spearman rank correlation coefficient between two vectors
- Parameters
R (ndarray) – First vector containing values
Q (ndarray) – Second vector containing values
- Returns
Value of correlation coefficient between two vectors
- Return type
Examples
>>> rS = spearman(R, Q)
- objective_weighting.correlations.weighted_spearman(R, Q)[source]
Calculate Weighted Spearman rank correlation coefficient between two vectors
- Parameters
R (ndarray) – First vector containing values
Q (ndarray) – Second vector containing values
- Returns
Value of correlation coefficient between two vectors
- Return type
Examples
>>> rW = weighted_spearman(R, Q)
- objective_weighting.correlations.pearson_coeff(R, Q)[source]
Calculate Pearson correlation coefficient between two vectors
- Parameters
R (ndarray) – First vector containing values
Q (ndarray) – Second vector containing values
- Returns
Value of correlation coefficient between two vectors
- Return type
Examples
>>> corr = pearson_coeff(R, Q)