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)
cdf(x)
rvs(size)
to calculate the probability density function (and its logarithm), the cumulative density function, and to get random samples from the distribution.
License
Copyright 2018 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
Built Distribution
Hashes for LogUniform-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e957087a18e9c10a95bd820f939cbcc9af680929b288feaf2a19bc1dd3c915d3 |
|
MD5 | 7dddbd8b57384ffae5cb0442cb09f7ef |
|
BLAKE2b-256 | 4a7f583ebab2af3bd5b8a3eb84557b96d6ed108f47118c94476d05e194dd2539 |