crispyn.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

Module Contents

crispyn.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)
crispyn.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)
crispyn.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)