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.

Note

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

Note

Underlying Literature

The following sources elaborate extensively on the topic:


Implementation

Code implementation demo
Code implementation demo

Example

Code example demo

Presentation Slides

../_images/codependence_slides.png