Codependence Matrix

The functions in this part of the module are used to generate dependence and distance matrices using the codependency and distance metrics described previously.

  1. Dependence Matrix function is used to compute codependences between elements in a given dataframe of elements using various codependence metrics like Mutual Information, Variation of Information, Distance Correlation, Spearman’s Rho, GPR distance, and GNPR distance.

  2. Distance Matrix function can be used to compute a distance matrix from a given codependency matrix using distance metrics like angular, squared angular and absolute angular.


MlFinLab makes use of these functions in the clustered feature importance module also they are used in the PortfolioLab package.


Underlying Literature

The following sources elaborate extensively on the topic:


Code implementation demo
Code implementation demo


Code example demo

Presentation Slides