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.5.tar.gz (102.2 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.5-py3-none-any.whl (102.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for flippy_lang-0.1.5.tar.gz
Algorithm Hash digest
SHA256 95b449fde0cd93d1b7d5b0c35c8e005869af7964a407e522a7451d58435c20b7
MD5 1f7d145d28dd8c273c8cdd3f56c6965a
BLAKE2b-256 c16259d80041636cfc339c9029ed3b5854427a672d82d6e75b1eb1442f0af0d9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for flippy_lang-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1e6887854d8b4ce75e7cd7a4e54bc90d542ab58317d3b083fa81e8cb20bd496a
MD5 96f3d15391dfdfbe9dde6e85909af3a9
BLAKE2b-256 b8a8847436b872620dcc69e32bf39a2b600edd9498eaeff5304b78d05991811b

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