ennemi: Non-linear correlation detection with mutual information
Petri Laarne,
Martha A. Zaidan,
Tuomo Nieminen
Affiliations
Petri Laarne
Institute for Atmospheric and Earth System Research/Physics, Faculty of Science, P.O. Box 64, FI-00014 University of Helsinki, Finland; Corresponding author.
Martha A. Zaidan
Institute for Atmospheric and Earth System Research/Physics, Faculty of Science, P.O. Box 64, FI-00014 University of Helsinki, Finland; Joint International Research Laboratory of Atmospheric and Earth System Sciences, School of Atmospheric Sciences, Nanjing University, Nanjing 210023, China
Tuomo Nieminen
Institute for Atmospheric and Earth System Research/Physics, Faculty of Science, P.O. Box 64, FI-00014 University of Helsinki, Finland; Institute for Atmospheric and Earth System Research/Forest Sciences, Faculty of Agriculture and Forestry, P.O. Box 27, FI-00014 University of Helsinki, Finland
We present ennemi, a Python package for correlation analysis based on mutual information (MI). MI is a measure of relationship between variables. Unlike Pearson correlation it is valid also for non-linear relationships, yet in the linear case the two are equivalent. The effect of other variables can be removed like with partial correlation, with the same equivalence. These features make MI a better correlation measure for exploratory analysis of many variable pairs. Our package provides methods for common correlation analysis tasks using MI. It is scalable, integrated with the Python data science ecosystem, and requires minimal configuration.