Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johannesbuchner/fasterscipydists
fasterscipydists provides faster scipy.stats distributions
https://github.com/johannesbuchner/fasterscipydists
probability-distribution scipy statistics
Last synced: 2 months ago
JSON representation
fasterscipydists provides faster scipy.stats distributions
- Host: GitHub
- URL: https://github.com/johannesbuchner/fasterscipydists
- Owner: JohannesBuchner
- Created: 2023-05-24T14:27:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-24T14:45:53.000Z (over 1 year ago)
- Last Synced: 2024-04-16T07:05:46.795Z (10 months ago)
- Topics: probability-distribution, scipy, statistics
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
fasterscipydists
=================
fasterscipydists provides faster scipy.stats distributions.Distributions implemented:
* uniform
* norm (Gaussian)
* expon (Exponential)
* dirac (Delta function)Functions implemented:
* mean
* std
* ppf
* logpdf
* cdfContributions are welcome! Please open issues or pull requests!
Usage
-----This is a drop-in replacement, so instead of::
import scipy.stats
rv = scipy.stats.norm(1, 2)you would do::
import fasterscipydists
rv = fasterscipydists.norm(1, 2)See the scipy.stats documentation https://docs.scipy.org/doc/scipy/reference/stats.html
Speed-up
--------speed.py reports these numbers::
norm.pdf : 7.6x faster with scipy.stats=0.126s, this=0.015s
norm.logpdf : 10.8x faster with scipy.stats=0.120s, this=0.010s
norm.cdf : 10.3x faster with scipy.stats=0.087s, this=0.008s
norm.ppf : 15.9x faster with scipy.stats=0.149s, this=0.009s
uniform.pdf : 9.2x faster with scipy.stats=0.114s, this=0.011s
uniform.logpdf : 8.2x faster with scipy.stats=0.127s, this=0.014s
uniform.cdf : 2.4x faster with scipy.stats=0.084s, this=0.025s
uniform.ppf : 26.7x faster with scipy.stats=0.144s, this=0.005s
expon.pdf : 15.3x faster with scipy.stats=0.110s, this=0.007s
expon.logpdf : 26.7x faster with scipy.stats=0.112s, this=0.004s
expon.cdf : 10.9x faster with scipy.stats=0.097s, this=0.008s
expon.ppf : 21.8x faster with scipy.stats=0.154s, this=0.007sTests
-----Systematic verification against scipy.stats is done in test.py. Run with::
pytest test.py