Skip to main content

Tools for estimating entropy of mixture distribution and more.

Project description

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.

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

mixentropy-0.0.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

mixentropy-0.0.1-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file mixentropy-0.0.1.tar.gz.

File metadata

  • Download URL: mixentropy-0.0.1.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for mixentropy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3541fd5f8d04eebb5def3f87b6c0d5213fc52327c6c5ddcd9d7f50803842f154
MD5 9eddedf2871956d7bd6942be16e0df18
BLAKE2b-256 66dbae6858984c7c87af922b4a16d4bb706d8ff9f8654fa601180ea4c9862d65

See more details on using hashes here.

File details

Details for the file mixentropy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mixentropy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for mixentropy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c68d590c72e0abdcf5a73e40ec61933caacc20561a02d9d9c26324fc5c479846
MD5 fded2659a38d4f4ae3a3369f32dfbd24
BLAKE2b-256 aa08bae7868e5044a2443affde5541b2ee45b49252bf7eb34a9b45d49c2b21dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page