A nano probabilistic programming language for Python
Project description
:baby_chick: Pioupiou
Pioupiou is a nano probabilistic programming language, embedded into Python.
Use it to define probabilistic models :
>>> import pioupiou as pp
>>> a, b = 0.5, 1.0
>>> X = pp.Uniform(0.0, 1.0)
>>> E = pp.Normal(0.0, 0.1)
>>> Y = a * X + b + E
and to simulate them :
>>> n = 1000 # number of samples
>>> omega = pp.Omega(n)
>>> x, y = X(omega), Y(omega)
>>> x # doctest: +ELLIPSIS
array([6.36961687e-01, 2.69786714e-01, 4.09735239e-02, ..., 3.80007897e-01])
>>> y # doctest: +ELLIPSIS
array([1.09588258, 1.22942954, 1.01954509, 0.99213115, ..., 1.14366864])
That's about it! Use this data as you see fit.
Getting started
Install the latest version of pioupiou with:
$ pip install --upgrade git+https://github.com/boisgera/pioupiou.git
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
Built Distribution
Close
Hashes for boisgera_pioupiou-0.0a6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fb3ea12ec66d5d863719b6b7d37225e7ef892c4141504d314a9af5fc75ed724 |
|
MD5 | d538d5d3f6ddf4ed0dbbcd14b455ea17 |
|
BLAKE2b-256 | 92b2eb44aa1c195684ed820b7af4ae95ca960b0d6d4d890c4e5c51ea1cd22c32 |