wefe.utils.calculate_ranking_correlations

wefe.utils.calculate_ranking_correlations(rankings: DataFrame, method: str = 'spearman') DataFrame[source]

Calculate the correlation between the calculated rankings.

It uses pandas corr() method to calculate the correlations. The method parameter documentarion was copied from the documentation of the pandas DataFrame.corr() method. To see the updated documentation, visit: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.corr.html

Parameters:
rankingspd.DataFrame

DataFrame that contains the calculated rankings.

method{‘pearson’, ‘kendall’, ‘spearman’} or callable

Correlation type: - pearson : standard correlation coefficient - kendall : Kendall Tau correlation coefficient - spearman : Spearman rank correlation - callable: callable with input two 1d ndarrays and returning a float.

Returns:
pd.DataFrame

A dataframe with the calculated correlations.