Skip to content
/ latentmi Public

python package for approximately estimating mutual information in high dimensions

License

Notifications You must be signed in to change notification settings

g-kl/latentmi

Repository files navigation

latentmi

Documentation Status PyPI version arXiv

Latent MI (LMI) approximation is a method for estimating mutual information in high dimensions, using the idea that real world high-dimensional data has underlying low-dimensional structure. For more details, see our manuscript (NeurIPS 2024 spotlight 🌟). latentmi is our Python implementation of LMI approximation, built with the hope that practicioners find it pleasant to use :)

Installation

$ pip install latentmi

Usage

from latentmi import lmi

Xs = # some samples of a high dimensional variable
Ys = # some samples of a high dimensional variable

pmis, embedding, model = lmi.estimate(Xs, Ys)

MI_estimate = np.nanmean(pmis) # voila !

More detailed instructions can be found in the demo notebook.

License

latentmi was created by Gokul Gowri. It is licensed under the terms of the MIT license.

Credits

latentmi was created with cookiecutter and the py-pkgs-cookiecutter template.

The implementation of the ksg estimator is adapted from Greg Ver Steeg's Nonparametric Entropy Estimation Toolbox.

About

python package for approximately estimating mutual information in high dimensions

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages