heavytailed
Perform distribution analysis on heavy-tailed distributed data
Raw data are expected to be positive integers. Maximum likelihood estimation (MLE) will be performed to fit the following models to the data:
- Exponential distribution
- Power-law distribution
- Power-law distribution with exponential cutoff
- Pairwise power-law distribution
- Poisson distribution
- Yule–Simon distribution
- Lognormal distribution
- Truncated lognormal distribution
- Shifted power-distribution with exponential cutoff
- Truncated shifted power-law distribution
An optimizer based on sequential least squares programming (SLSQP) is applied to maximize the likelihood function. (Initially, it was based on L-BFGS-B, but L-BFGS-B cannot handle inequality constraints, which are used to avoid overflow.)
The model with minimum AIC (or say the largest Akaike weight) will be selected as the best-fitted model.
The analysis mainly focuses on the tails, and the start of the tail will be determined through minimizing the K-S distance between fitted models and the empirical distribution.
Installation:
pip install heavytailed
or
conda install -c wangxiangwen heavytailed
Example Usage:
from heavytailed import compare
compare.comparison('testdata/raw_25_bets.dat', xmin=25)
The MLE could be a non-convex function, therefore it is suggested to try different initial values (for distribution parameters) to avoid local minima.
If you find this package useful in your publication, please kindly consider citing the following two articles:
- Wang, X., & Pleimling, M. (2017). Foraging patterns in online searches. Physical Review E, 95(3), 032145.
- Wang, X., & Pleimling, M. (2018). Behavior analysis of virtual-item gambling. Physical Review E, 98(1), 012126.
Metadata
Release files for heavytailed 1.0.3
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 |
|---|---|---|---|---|
| heavytailed-1.0.3.tar.gz | 11.2 kB | Without provenance | Details for heavytailed-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| heavytailed-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for heavytailed-1.0.3-py3-none-any.whl |
Total release size: 30.1 kB
Release files / heavytailed-1.0.3.tar.gz
| Download URL | heavytailed-1.0.3.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62a9c9d1af99aa45b0eaeb798ee3c0073a992da1c0aa7b3e5a4e2d42f6812362
|
|
BLAKE2b-256 checksum How to use checksums |
7094953bf7494df891b94f9599494d1ff19ad5fd8149eb23df68c0dd2cb6f5ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.10
|
Release files / heavytailed-1.0.3-py3-none-any.whl
| Download URL | heavytailed-1.0.3-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d2d1668eb7850bc9a921b258d099dfb1f9b195d7550857a18c36f09aaee155f
|
|
BLAKE2b-256 checksum How to use checksums |
5394e2ef6f48008625713bf5cb1527e6ed9efe741260a9380fa09cc43948f2a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.10
|
Security for heavytailed 1.0.3
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.