This is a package for common distributions, e.g. Gaussian, Binomial
Project description
Distribution: A package to demonstrate a few statistical distributions
This tq010or-distribution package is a demo for a few statistical distributions.
Features
- Can sample from the distribution
- Can estimate distribution parameters with samples
- Easy plot integration
- Support Gaussian and Binomial (as of July 2020)
- Extensible to include other distributions
Installation
- Operating system: Linux · Windows (Cygwin, MinGW, Visual Studio)
- Python version: Python 3.6+
pip
pip install tq010or-distribution
Or you can install them in your virtual environment:
python -m venv .env
source .env/bin/activate
pip install tq010or-distribution
Usage
>>> from distributions.gaussian import Gaussian
>>> g = Gaussian(0, 1)
>>> print(g)
Gaussian(0, 1)
>>> samples = g.sample(10000)
>>> ge = Gaussian.estimate(samples)
>>> print(ge)
Gaussian(0.016869274639641572, 0.9910041611791893)
>>> g1 = Gaussian(0, 3)
>>> g2 = Gaussian(1, 4)
>>> g3 = g1 + g2
>>> assert g3 == g1 + g2
>>>
Run tests
python -c "import os; import distributions; print(os.path.dirname(distributions.__file__))"
pip install -r path/to/requirements.txt
python -m pytest <distributions-directory>
Project details
Release history Release notifications | RSS feed
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 tq010or-distributions-0.0.1rc0.tar.gz.
File metadata
- Download URL: tq010or-distributions-0.0.1rc0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.1.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73733a725009559e9cea6129f823ae59ea58b8a2d091f7f2ef40d3ae1731f41e
|
|
| MD5 |
13d3037a180479b735ef3b0c209ca4dd
|
|
| BLAKE2b-256 |
9f0d625fc73e3e303fe3425887ae2be29942ffa48160b88306f0a4f48dea58b9
|