Skip to main content

A nano probabilistic programming language for Python

Project description

Pioupiou 🐤

test coverage stage

Introduction

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.

data

Getting started

Install the latest version of pioupiou with:

$ pip install --upgrade git+https://github.com/boisgera/pioupiou.git

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

boisgera-pioupiou-0.0a11.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

boisgera_pioupiou-0.0a11-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file boisgera-pioupiou-0.0a11.tar.gz.

File metadata

  • Download URL: boisgera-pioupiou-0.0a11.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for boisgera-pioupiou-0.0a11.tar.gz
Algorithm Hash digest
SHA256 0bd7d1065ea04ea6273997a8a0456c53efd0eaa9f5b820b488ed71dac2b2ab0f
MD5 b3d3d20ca74cf367e5576e8afe7eb6e3
BLAKE2b-256 f298c3ef09a2375d0354b6b85c2c3d24f0e12dfcb27262c0ec324986de849031

See more details on using hashes here.

File details

Details for the file boisgera_pioupiou-0.0a11-py3-none-any.whl.

File metadata

  • Download URL: boisgera_pioupiou-0.0a11-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for boisgera_pioupiou-0.0a11-py3-none-any.whl
Algorithm Hash digest
SHA256 428d74685ca5f5d491a18f541f4c7b4744b1e6f0aa07e45b1b0539c144558af6
MD5 f0073d65a37c840140572e4ef3e39377
BLAKE2b-256 016100d30d1c0d4eee01683dd6a6d82932156cc3f290b7033db10c8e0991fb49

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page