Discrete probability distributions in Python
Lea is a Python package aiming at working with discrete probability distributions in an intuitive way. It allows you to model a broad range of random phenomena, like dice throwing, coin tossing, gambling, weather, finance, etc. More generally, Lea may be used for any finite set of discrete values having known probability: numbers, booleans, date/times, symbols, … Each probability distribution is modeled as a plain object, which can be named, displayed, queried or processed to produce new probability distributions.
Lea also provides advanced functions that target Probabilistic Programming (PP); these include conditional probabilities, Bayes inference and Markov chains. To ease interactive calculations, an optional PP language (PPL), called “Leapp”, is included in the package; it extends Python syntax with few constructs to define and manipulate probabilistic models in an extremely concise way.
To install this beta version of Lea, type the following command:
pip install lea==2.3.4
Please go on project home page below for a comprehensive documentation.