Skip to main content

Discrete probability distributions in Python

Project description

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 distributions.

Lea also provides advanced functions and Probabilistic Programming (PP) features; these include conditional probabilities, joint probability distributions, Bayesian networks, Markov chains and symbolic computation.

All probability calculations in Lea are performed by a new exact algorithm, the Statues algorithm, which is based on variable binding and recursive generators. For problems intractable through exact methods, Lea provides on-demand approximate algorithms, namely MC rejection sampling and likelihood weighting.

Beside the above-cited functions, Lea provides some machine learning functions, including Maximum-Likelihood and Expectation-Maximization algorithms.

Lea can be used for AI, education (probability theory & PP), generation of random samples, etc.

Lea 4 requires Python 3.8+. For earlier Python versions (2.6+), Lea 3 can be used.

Please visit Lea project’s wiki page for a comprehensive documentation.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lea-4.0.1.tar.gz (93.3 kB view details)

Uploaded Source

File details

Details for the file lea-4.0.1.tar.gz.

File metadata

  • Download URL: lea-4.0.1.tar.gz
  • Upload date:
  • Size: 93.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.0

File hashes

Hashes for lea-4.0.1.tar.gz
Algorithm Hash digest
SHA256 0ebd945cea907d3c384007e414f3e505f79e315bac424cdaffe7e5bf507997d9
MD5 513c9e6888e1044057004e7522d18942
BLAKE2b-256 7a890d57e1c633c217eff816b7e5f4fd3571d073374e1df453cbc9907dd4b3f3

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