ANN: Lea 1.1 (discrete probability distributions)
I have the pleasure to announce the release of Lea 1.1. Lea is a Python package aiming at working with discrete probability distributions in an intuitive way. It allows modelling a broad range of random discrete phenomenons. Then, it allows calculating probabilities of events, whether atomic, aggregated or combined through given operations. A typical example is the probabilities of the sum of N dice having known, possibly unfair, probability distributions. Features Here are the main features of Lea: - models finite discrete probability distributions - standard distribution indicators (mean, standard deviation,.) - arithmetic and logical operators on probability distribution - cartesian products, conditional probabilities, joint distributions - generation of random samples - open-source project, LGPL license - pure Python module, lightweight - no package dependency - probabilities stored as integers (no floating-point biases) Links - Download (PyPi):http://pypi.python.org/pypi/lea Project page: http://code.google.com/p/lea/ (with wiki documentation including tutorials, examples and API) Hoping this could be helpful in this uncertain universe... Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 1.2 (discrete probability distributions)
I have the pleasure to announce the release of Lea 1.2. Lea is a Python package aiming at working with discrete probability distributions in an intuitive way. It allows modeling a broad range of random discrete phenomenon's. Then, it allows calculating probabilities of events, whether atomic, aggregated or combined through given operations. A typical example is the probabilities of the sum of N dice having known, possibly unfair, probability distributions. Features Here are the main features of Lea: - models finite discrete probability distributions - standard distribution indicators (mean, standard deviation,.) - arithmetic and logical operators on probability distribution - cartesian products, conditional probabilities, joint distributions - generation of random samples - open-source project, LGPL license - pure Python module, lightweight - no package dependency - probabilities stored as integers (no floating-point biases) Links - Download (PyPi): http://pypi.python.org/pypi/lea Project page: http://code.google.com/p/lea/ (with wiki documentation including tutorials, examples and API) Hoping this could be helpful in this uncertain universe... Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 1.3.1 released
Lea, discrete probability distributions in Python = I have the pleasure to announce the release of Lea 1.3.1. NEW: Lea now runs on Python 3 (and still on Python 2.x) ! Lea is a Python package that allows you to define and play with discrete probability distributions in an intuitive way. Lea can model a broad range of random discrete phenomenons. Then, it allows calculating probabilities of events, whether atomic, aggregated or combined through operations. A typical example is the probabilities of the sum of N dice having known, possibly unfair, probability distributions. Download (PyPi) === <http://pypi.python.org/pypi/lea> http://pypi.python.org/pypi/lea Project page / documentation <http://code.google.com/p/lea/> http://code.google.com/p/lea/ Features - models finite discrete probability distributions - standard distribution indicators (mean, standard deviation,.) - arithmetic and logical operators on probability distribution - cartesian products, conditional probabilities, joint distributions - generation of random samples - open-source project, LGPL license - runs on Python 2.x and 3.x - pure Python module, lightweight - no package dependency - probabilities stored as rationals (no floating-point biases) Hoping Lea could be helpful in this uncertain universe... Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 2.0.0 (beta.2) released
I am pleased to announce that Lea 2.0.0 (beta.2) is released! What is Lea? 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 phenomenons, like dice throwing, coin tossing, gambling, weather, finance, etc. Lea is open-source (LGPL) and runs on Python 2 or 3. What's new in Lea 2? Here are the main new features, as of Lea 1.x : - new methods: pmf, cdf, fromSeq, ... - CPT (Conditional Probability Tables) - Bayesian networks - Markov chains - *Leapp*, a small probabilistic programming language on top of Lea/Python - in-depth extension of wiki tutorials - new logo! Lea project page + documentation http://code.google.com/p/lea/ Download Lea (PyPi) --- http://pypi.python.org/pypi/lea/2.0.0-beta.2 Hoping Lea could be helpful in this uncertain universe... ! Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 2.0.0 released
I am pleased to announce the release of Lea 2.0.0 ! What is Lea? 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 phenomenons, like dice throwing, coin tossing, gambling, weather , etc. Lea is open-source (LGPL) and runs on Python 2 or 3. What's new in Lea 2? Here are the main new features, as of Lea 1.x : - new methods: pmf, cdf, fromSeq, binom, bernoulli, interval, ... - CPT (Conditional Probability Tables) - Bayesian networks - Markov chains - *Leapp*, a small probabilistic programming language - in-depth extension of wiki tutorials Lea project page + documentation <http://code.google.com/p/lea/> Download Lea (PyPI) --- http://pypi.python.org/pypi/lea <http://pypi.python.org/pypi/lea/2.0.0-beta.2> With the hope that Lea can make your happiness less uncertain, Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 2.1.1 released
I am pleased to announce the release of Lea 2.1.1 ! What is Lea? 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 phenomenons, like dice throwing, coin tossing, gambling, weather, etc. It offers several modelling features of a PPL (Probabilistic Programming Language), including bayesian inference and Markov chains. Lea is open-source (LGPL) and runs on Python 2 or 3. See project page below for more information (installation, tutorials, examples, etc). What's new in Lea 2.1.1? (compared to 2.0.0) - new methods: mode, if_ and reduce - bug fixes on CPT (conditional probability tables) - fixed broken withProb method - performance improvements for Python 2 Lea project page http://code.google.com/p/lea Download Lea (PyPI) --- http://pypi.python.org/pypi/lea With the hope that Lea can make your happiness less uncertain, Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 2.1.2
I am pleased to announce the release of Lea 2.1.2! There are NO known open bug in this version. Please note the migration of the project to Bitbucket (see URL below), due to the approaching end of Google Code. What is Lea? 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 phenomenons, like dice throwing, coin tossing, gambling, weather, etc. It offers several modelling features of a PPL (Probabilistic Programming Language), including bayesian inference and Markov chains. Lea is open-source (LGPL) and runs on Python 2 or 3. See project page below for more information (installation, tutorials, examples, etc). Lea project page https://bitbucket.org/piedenis/lea Download Lea (PyPI) --- http://pypi.python.org/pypi/lea With the hope that Lea can make your fun less uncertain, Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 2.2.0-beta.4
Hi all! For those of you interested in probabilities and probabilistic programming, I’m happy to announce that Lea 2.2.0 is now under beta-test. What is Lea? 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 phenomenons, like dice throwing, coin tossing, gambling, weather, etc. It offers several high-level modelling features for probabilistic programming, including bayesian inference and Markov chains. Lea is open-source (LGPL) and runs on Python 2 or 3. See project page below for more information (installation, tutorials, examples, etc). What’s new? --- Compared to latest version (2.1.2), many things have been made in 2.2.0 to improve ease-of-use and overall performance, without breaking backward compatibility. Maybe one of the most notable feature is that you can now get individual probability very easily, as a fraction or float, thanks to the new 'P' and 'Pf' functions, e.g. >>> P(dice <= 5) 5/18 >>> Pf(dice <= 5) 0.2778 >>> P(rain.given(grassWet)) 891/2491 >>> Pf(rain.given(grassWet)) 0.3576876756322762 New methods allow you to read a CSV file or Pandas dataframe, then build the corresponding joint probability distribution. Also, Monte-Carlo sampling estimation is now available, should Lea’s default exact evaluation is intractable. Most of the new features are documented in a new tutorial on Lea's wiki (https://bitbucket.org/piedenis/lea/wiki/LeaPyTutorial3). The latest version, Lea 2.2.0-beta.4, is fairly stable (no known bug) so you can start to use it and report any problem or dislike, if any. Lea project page https://bitbucket.org/piedenis/lea Download Lea (PyPI) --- http://pypi.python.org/pypi/lea With the hope that Lea can make the Force less uncertain, Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 2.2.0
Lea 2.2.0 is now released! What is Lea? 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 phenomenons, like dice throwing, coin tossing, gambling, finance, weather, etc. It offers high-level modeling features for probabilistic programming and bayesian inference. Lea has several original features: the storage of probabilities as integer weights, an inference algorithm that produces *exact* results and a strong emphasis on ease-of-use. Lea is lightweight, open-source (LGPL) and pure Python, with support of versions 2 and 3). See project page below for installation, tutorials, examples, etc. What's new in Lea 2.2.0? Compared to latest version (2.1.2), many things have been made to improve ease-of-use and overall performance. Maybe one of the most notable feature is that you can now get individual probabilities very easily, as a fraction or float, thanks to the new 'P' and 'Pf' functions. Here are some examples that you can type in your Python console: >>> P(dice <= 5) 5/18 >>> Pf(dice <= 5) 0.2778 >>> P(rain.given(grassWet)) 891/2491 >>> Pf(rain.given(grassWet)) 0.3576876756322762 Other new features include: - build joint probability distributions from CSV files or Pandas dataframes - pmf histograms using matplotlib - Monte-Carlo sampling estimation - multi-arguments 'given' method (ANDing of evidences) - likelihood ratio - extended 'draw' method: with/without sorting, with/without replacement - machine learning (experimental) - built-in functions and distributions for games - various optimizations Most of the new features are documented in a new tutorial on Lea's wiki (http://bitbucket.org/piedenis/lea/wiki/LeaPyTutorial3). Credits --- Thanks to all of you for this large bunch of feedbacks, encouragements and suggestions! In particular, the present version owes much to Paul Moore, who made important contributions; among other things, Paul fixed the installation procedure, set up a test suite using the Tox tool and created an efficient algorithm for calculating probability distribution resulting from a drawing process. Thanks Paul for making the package more mature! Lea project page http://bitbucket.org/piedenis/lea Download Lea (PyPI) --- http://pypi.python.org/pypi/lea With the hope that Lea can make your joy less random, Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 2.3 released
Lea 2.3 is now released! ---> http://pypi.python.org/pypi/lea/2.3.4 What is Lea? 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 phenomenons, like dice throwing, coin tossing, gambling, finance, weather, etc. It offers high-level modeling features for probabilistic programming and Bayesian inference. Lea has several original features: the storage of probabilities as integer weights, an inference algorithm that produces *exact* results and a strong emphasis on ease-of-use. Lea is lightweight, open-source (LGPL) and pure Python, with support of versions 2 and 3). See project page below for installation, tutorials, examples, etc. What's new in Lea 2.3? -- Compared to latest version (2.2), few things, although important, have been added. * A new method, 'switch', allows you to make efficient Bayesian networks. For variables having many dependences, there is a dramatic speed improvement regarding the 'buildCPT' method available so far. The new method is fully documented in the wiki page dedicated to Bayesian inference, which has been updated in depth: http://bitbucket.org/piedenis/lea/wiki/LeaPyTutorial2. * A new method, 'internal', allows you to see what's inside any Lea instance (should you be curious of that). * Bugs on some secondary methods have been fixed. * Last but not least, for those of you interested in information theory, two new methods have been added to calculate joint entropy and conditional entropy (aka equivocation): http://bitbucket.org/piedenis/lea/wiki/LeaPyTutorial1#markdown-header-mutual -information-joint-and-conditional-entropy What's *in* Lea? Lea uses an original probabilistic inference algorithm called the *Statues algorithm*. This relies on the generator construct, a special case of coroutine, embodied in Python with the 'yield' statement. Should you be interested in this topic: - you could have a look at the MicroLea project, which implements no more than the core Statues algorithm (http://bitbucket.org/piedenis/microlea); - be informed that I've written a paper (draft/unpublished) that describes this algorithm in details; if you required it to me, I can provide you this paper; BTW, I would be glad to receive your feedbacks/advices for a potential submission. Lea project page http://bitbucket.org/piedenis/lea Documentation - http://bitbucket.org/piedenis/lea/wiki/Home Download Lea (PyPI) --- http://pypi.python.org/pypi/lea/2.3.4 With the hope that Lea can make the World less uncertain, Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 3.0.0 beta 2
Lea 3.0.0.beta.2 is now released! ---> http://pypi.org/project/lea/3.0.0.beta.2 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 distributions. 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 -> http://bitbucket.org/piedenis/lea/wiki/Home 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: print (P(lea.binom(6,1/4) <= 2)) # -> 0.83056640625 print (P(lea.binom(6,'1/4') <= 2)) # -> 1701/2048 print (P(lea.binom(6,'p') <= 2)) # -> (p - 1)**4*(10*p**2 + 4*p + 1)) print (P(lea.binom(6,'p') <= 2).subs('p',1/4)) # -> 0.83056640625 To learn more... Lea project page -> http://bitbucket.org/piedenis/lea Documentation-> http://bitbucket.org/piedenis/lea/wiki/Home Lea 3 on PyPI-> http://pypi.org/project/lea/3.0.0.beta.1 With the hope that Lea can make the Universe less uncertain, Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 3.0 released
Lea 3.0 final is now released! ---> http://pypi.org/project/lea/3.0.0 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 distributions. 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, ... LGPL - Python 2.6+ / Python 3 supported 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 -> http://bitbucket.org/piedenis/lea/wiki/Home * paper on the "Statues" algorithm used in Lea -> http://arxiv.org/abs/1806.09997 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: print (P(lea.binom(6,1/4) <= 2)) # -> 0.83056640625 print (P(lea.binom(6,'1/4') <= 2)) # -> 1701/2048 print (P(lea.binom(6,'p') <= 2)) # -> (p - 1)**4*(10*p**2 + 4*p + 1)) print (P(lea.binom(6,'p') <= 2).subs('p',1/4)) # -> 0.83056640625 To learn more... Lea 3 on PyPI -> http://pypi.org/project/lea/3.0.0 Lea project page -> http://bitbucket.org/piedenis/lea Documentation -> http://bitbucket.org/piedenis/lea/wiki/Home Statues algorithm -> http://arxiv.org/abs/1806.09997 With the hope that Lea can make the Universe less hazardous, Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
ANN: Lea 3.1.0 released
Lea 3.1.0 final is now released! ---> http://pypi.org/project/lea/3.1.0 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 distributions. 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, PP, gambling, education, ... LGPL - Python 2.6+ / Python 3 supported What's new in Lea 3.1.0? The present version essentially consolidates the previous one (3.0.1), adding just few new features. The main changes are: - new switch_func method, for defining CPT by a function (far less memory-consuming for models like noisy-or, noisy-max) - improvements on Markov chain functions, including calculation of absorbing MC - optimization of lea.max_of, lea.min_of functions - bug fixes for symbolic calculation (in particular for Python 2.7) - numerous addings/improvements on wiki tutorials and documentation, especially on Lea API Many thanks... -- ... to Paul Moore, Jens Finkhaeuser and Rasmus Bonnevie who provided proposals, contributions, feedbacks that gave the impetus for the present version. To learn more... Lea 3 on PyPI -> http://pypi.org/project/lea/3.1.0 Lea project page -> http://bitbucket.org/piedenis/lea Documentation -> http://bitbucket.org/piedenis/lea/wiki/Home Statues algorithm -> http://arxiv.org/abs/1806.09997 With the hope that Lea can make this Universe less hazardous, Pierre Denis -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/