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.
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.
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:
Codependence (Presentation Slides) by Marcos Lopez de Prado.