Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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>

Metadata

Release files for tq010or-distributions 0.0.1rc0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tq010or-distributions 0.0.1rc0
File Size Uploaded
tq010or-distributions-0.0.1rc0.tar.gz 5.5 kB Details

Release files / tq010or-distributions-0.0.1rc0.tar.gz

Download URL tq010or-distributions-0.0.1rc0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
73733a725009559e9cea6129f823ae59ea58b8a2d091f7f2ef40d3ae1731f41e
BLAKE2b-256 checksum
How to use checksums
9f0d625fc73e3e303fe3425887ae2be29942ffa48160b88306f0a4f48dea58b9
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.1rc0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page