Skip to main content

MixEntroPY

Numpy & PyTorch vectorized implementation of various differential entropy estimators for ML & DL.

About The Project

Information theory-inspired machine learning methods are gaining increasing interest, with estimation of the entropy as well as mutual information of random variables serving as their cornerstone.

To estimate the Shannon entropy of a discrete random variable, given its probability distribution, one can simply apply the definition of Shannon entropy $H(x)=-\sum_i p(x_i)\log p(x_i)$ to obtain an accurate result.

But when it comes to estimate differential entropy, $h(x)=-\int p(x)\log p(x)dx$, from data points sampled from datasets or models, often there is no prior knowledge about the underlying distribution.

In such cases, we could make an assumption of the unknown distribution and expect the assumed distribution to have a closed-form expression for its entropy calculation, e.g., multivariate Gaussian.

Kernel Density Estimation(KDE) is one of commonly used methods to approximate probability density of a distribution, However, while a single kernel may have a closed-form expression for its entropy, the mixture of these kernels typically does not.

This project offers several entropy estimators for these mixture distributions, (mainly focus on mixture of Gaussian and mixture of uniform), implemented with both Numpy and PyTorch.

Most of the estimators are differentiable, making them suitable for optimization purposes.

Please see Github https://github.com/grizxlyzx/MixEntroPY for more information.

Metadata

Release files for mixentropy 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mixentropy 0.0.1
File Size Uploaded
mixentropy-0.0.1.tar.gz 17.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mixentropy 0.0.1
File Interpreter ABI Platform
mixentropy-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 38.2 kB

Release files / mixentropy-0.0.1.tar.gz

Download URL mixentropy-0.0.1.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3541fd5f8d04eebb5def3f87b6c0d5213fc52327c6c5ddcd9d7f50803842f154
BLAKE2b-256 checksum
How to use checksums
66dbae6858984c7c87af922b4a16d4bb706d8ff9f8654fa601180ea4c9862d65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Release files / mixentropy-0.0.1-py3-none-any.whl

Download URL mixentropy-0.0.1-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c68d590c72e0abdcf5a73e40ec61933caacc20561a02d9d9c26324fc5c479846
BLAKE2b-256 checksum
How to use checksums
aa08bae7868e5044a2443affde5541b2ee45b49252bf7eb34a9b45d49c2b21dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.18

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page