What is Lea?
Lea is a Python module aiming at working with discrete probability
distributions in an intuitive way.
It allows you modeling a broad range of random phenomena: 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
Lea also provides advanced functions and Probabilistic Programming (PP)
features; these include conditional probabilities, Bayesian networks, joint
probability distributions, Markov chains and symbolic computation.
Lea can be used for AI, machine learning, education, ...
What's new in Lea 3?
Compared to latest version (2.3.5), many things have changed to extend the
usability and openness of the library. To name a few:
* ability to choose between different probability representations: floats,
fractions and decimals
* symbolic computation: Lea can now calculate probability *formula* using
the SymPy library (http://www.sympy.org)
* simpler API and compliance with PEP8 naming convention
* revamped tutorials and examples ->
Here is a short sample. A biased coins is flipped with 1/4 chance to be
'head'. Suppose that this coin is thrown 6 times. What is the probability to
get no more than two 'heads'? Here is how you could make this calculation in
Lea, using successively float, fraction and symbolic representations: