Skip to main content

FlipPy probabilistic programming language

Project description

FlipPy Logo

FlipPy: Pythonic Probabilistic Programming

FlipPy lets you specify probabilistic programs in Python syntax while seamlessly interacting with the rest of Python.

Documentation and tutorials can be found here.

Quick start

FlipPy can be installed with pip:

pip install flippy-lang

The core functionality of FlipPy does not require any dependendencies, so the above command will only install FlipPy. To install the dependencies required for full functionality, use:

pip install flippy-lang[full]

Example: Sum of Bernoullis

FlipPy lets you specify probablistic programs using standard Python syntax. Here is a simple example involving the sum of two Bernoulli random variables:

from flippy import infer, flip

@infer
def fn():
    x = flip(0.5)
    y = flip(0.5)
    return x + y

fn() # Distribution({0: 0.25, 1: 0.5, 2: 0.25})

Tests

To run the tests (this requires installing pytest):

(venv) $ pytest

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

flippy_lang-0.1.4.tar.gz (97.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flippy_lang-0.1.4-py3-none-any.whl (101.7 kB view details)

Uploaded Python 3

File details

Details for the file flippy_lang-0.1.4.tar.gz.

File metadata

  • Download URL: flippy_lang-0.1.4.tar.gz
  • Upload date:
  • Size: 97.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for flippy_lang-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9e8f31af5c44f074613c4f97d09dc45caccf118e61ce5591b63dd75e1c917f95
MD5 5c851aaec2c6ef43a76b441a362e205e
BLAKE2b-256 a8d9de21f5ddbb046c7d83f8b1ca6f0a8139c0de28820c879a5b1da1d42f1816

See more details on using hashes here.

File details

Details for the file flippy_lang-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: flippy_lang-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 101.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for flippy_lang-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c75d32ced78b4f3c733edc9189c4df63715553f2cc756e2eedadf4d8dc685337
MD5 3b573113fb74bd8fb4e23709faf1f61a
BLAKE2b-256 04f8f7464eec6e2a578af257db56cb8043c06adc97e57fde76e152eff88e0eb2

See more details on using hashes here.

Supported by

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