Implementation of the log-uniform and modified log-uniform distributions
Project description
A simple implementation of the log-uniform and modified log-uniform distributions.
How to use
Install it from pip (LogUniform only depends on numpy)
pip install LogUniform
and it’s ready to use from Python
import loguniform
LogUniform comes with two simple classes, LogUniform and ModifiedLogUniform. They are intended to mimic the API of scipy.stats (actually, the log-uniform distribution is already implemented in scipy.stats.reciprocal; the two implementations are compatible).
from loguniform import LogUniform, ModifiedLogUniform
d1 = LogUniform(a=1, b=1000)
d2 = ModifiedLogUniform(knee=1, b=1000)
both distributions d1 and d2 now have methods
pdf(x) and logpdf(x): the probability density function and its logarithm
cdf(x): cumulative density function
ppf(x): percent point function (inverse of cdf)
rvs(size): draw random samples from the distribution
support(): support of the distribution
License
Copyright 2021 João Faria.
LogUniform is free software made available under the MIT License. For details see the LICENSE file.
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
File details
Details for the file LogUniform-2.0.1.tar.gz
.
File metadata
- Download URL: LogUniform-2.0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90bd195d649c1023a4677e4993d486281826e3a546c3fbc99fe7153cc4a483cc |
|
MD5 | 6d60ede8b64667c63581b544635dbf86 |
|
BLAKE2b-256 | 2a866a801397666e6b23c17e7b2d3aa4e4d271dfc204974def9d76eb4f69dc0f |