pyrepo_mcda.correlations

Functions

spearman(R, Q)

Calculate Spearman rank correlation coefficient between two vectors

weighted_spearman(R, Q)

Calculate Weighted Spearman rank correlation coefficient between two vectors

pearson_coeff(R, Q)

Calculate Pearson correlation coefficient between two vectors

WS_coeff(R, Q)

Calculate Rank smilarity coefficient between two vectors

Module Contents

pyrepo_mcda.correlations.spearman(R, Q)

Calculate Spearman rank correlation coefficient between two vectors

Parameters

Rndarray

First vector containing values

Qndarray

Second vector containing values

Returns

float

Value of correlation coefficient between two vectors

Examples

>>> rS = spearman(R, Q)
pyrepo_mcda.correlations.weighted_spearman(R, Q)

Calculate Weighted Spearman rank correlation coefficient between two vectors

Parameters

Rndarray

First vector containing values

Qndarray

Second vector containing values

Returns

float

Value of correlation coefficient between two vectors

Examples

>>> rW = weighted_spearman(R, Q)
pyrepo_mcda.correlations.pearson_coeff(R, Q)

Calculate Pearson correlation coefficient between two vectors

Parameters

Rndarray

First vector containing values

Qndarray

Second vector containing values

Returns

float

Value of correlation coefficient between two vectors

Examples

>>> corr = pearson_coeff(R, Q)
pyrepo_mcda.correlations.WS_coeff(R, Q)

Calculate Rank smilarity coefficient between two vectors

Parameters

Rndarray

First vector containing values

Qndarray

Second vector containing values

Returns

float

Value of similarity coefficient between two vectors

Examples

>>> ws = WS_coeff(R, Q)