Information Theoretic Measures of Entropy and Divergence
Project description
Divergence
Divergence is a Python package to compute statistical measures of entropy and divergence from probability distributions and samples.
The following functionality is provided:
- (Information) Entropy
- Cross Entropy
- Relative Entropy or Kullback-Leibler (KL-) Divergence
- Jensen-Shannon Divergence
- Joint Entropy
- Conditional Entropy
- Mutual Information
The units in which these entropy and divergence measures are calculated can be specified by the user.
This is achieved by the argument base
, to 2.0
, 10.0
, or np.e
.
In a Bayesian context, relative entropy can be used as a measure of the information gained by moving
from a prior distribution q
to a posterior distribution p
.
Installation
pip install divergence
Examples
See the Jupyter notebook Divergence.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
divergence-0.4.1.tar.gz
(14.7 kB
view hashes)
Built Distribution
divergence-0.4.1-py3-none-any.whl
(16.4 kB
view hashes)
Close
Hashes for divergence-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 284478f68cc4680339f220451713eed36db2f68304364d360811d2d89465ca4b |
|
MD5 | 20888ebba36fdb1d033cee0f3519046a |
|
BLAKE2b-256 | 9851b2c294b6b96a28a1116440eb0758f3f36fd2f60f96f377cb3c0d65959b01 |