maxentropy: Maximum entropy and minimum divergence models in Python
Purpose
This package helps you to construct a probability distribution (Bayesian prior) from prior information that you encode as generalized moment constraints.
You can use it to either:
-
find the flattest distribution that meets your constraints, using the maximum entropy principle (discrete distributions only)
-
or find the "closest" model to a given prior model (in a KL divergence sense) that also satisfies your additional constraints.
Background
The maximum entropy principle has been shown [Cox 1982, Jaynes 2003] to be the unique consistent approach to constructing a discrete probability distribution from prior information that is available as "testable information".
If the constraints have the form of linear moment constraints, then the principle gives rise to a unique probability distribution of exponential form. Most well-known probability distributions are special cases of maximum entropy distributions. This includes uniform, geometric, exponential, Pareto, normal, von Mises, Cauchy, and others: see here.
Examples: constructing a prior subject to known constraints
See the notebooks folder.
Quickstart guide
This is a good place to start: Loaded die example (scikit-learn estimator API)
History
This package previously lived in SciPy
(http://scipy.org) as scipy.maxentropy from versions v0.5 to v0.10.
It was under-maintained and removed from SciPy v0.11. It has since been
resurrected and refactored to use the scikit-learn Estimator inteface.
Copyright
(c) Ed Schofield, 2003-2019
Metadata
Release files for maxentropy 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| maxentropy-0.3.0.tar.gz | 47.6 kB | Without provenance | Details for maxentropy-0.3.0.tar.gz |
Release files / maxentropy-0.3.0.tar.gz
| Download URL | maxentropy-0.3.0.tar.gz |
|---|---|
| Size | 47.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac00af89312eb910e19e0911cdd2922aee84b2a46c55ea16e64f0c64ed14fb9c
|
|
BLAKE2b-256 checksum How to use checksums |
2765aba65609f961a6e6cef14c9d2cc81445c973c9c51317aa5cee2c4213cc09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for maxentropy 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.