Putting GaelVaraquaux's gist in a repo. Mutual information calculation utils.
Project description
Mutual Information
Estimating differential entropy and mutual information.
Non-parametric computation of differential entropy and mutual-information. Originally adapted by G Varoquaux in a gist for code created by R Brette, itself from several papers (see in the code). These computations rely on nearest-neighbor statistics.
- Kozachenko, L. F. & Leonenko, N. N. 1987 Sample estimate of entropy of a random vector. Probl. Inf. Transm. 23, 95-101
- Evans, D. 2008 A computationally efficient estimator for mutual information, Proc. R. Soc. A 464 (2093), 1203-1215
- Kraskov A, Stogbauer H, Grassberger P. (2004). Estimating mutual information. Phys Rev E 69(6 Pt 2):066138
- F. Perez-Cruz, (2008). Estimation of Information Theoretic Measures for Continuous Random Variables. Advances in Neural Information Processing Systems 21 (NIPS). Vancouver (Canada), December.
See Makefile
for example ops.
See https://pypi.org/project/mutual-info
Do not pin packages for now. Let's surf latest and find out when things break.
Install
python setup.py install
or
pip install pypi
Develop install
python setup.py develop
Tests
make test
TODO
- incorporate fixes from @thismartian (see thismartian branch)
- test shift invariance of entropy (not multiplicative)
- test triangle inequality of mutual information
- test symmetry of mutual information
- test scale and shift invariance of mutual information (any smooth invertible transformation)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mutual_info-0.31.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for mutual_info-0.31-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1587960404ee40da37ff9342d5a3a6a2ed4425def82ba1c7ce4e7843f5d1f0b9 |
|
MD5 | 277e34c0cfc4b27430c77c0780af21c3 |
|
BLAKE2b-256 | 5340dc6efa9f70c21ad67b12de25aad168f3eb69c0e688bc77c7ab7ebb3b2ba1 |