I have just added a new module for handling (finite) probability  
distributions to clojure-contrib. Some examples are included as well,  
but for those who want to see the examples without downloading the  
clojure-contrib source code, I also uploaded them to the files  
section of this group:

        http://groups.google.com/group/clojure/web/ 
probability_distributions.clj

This module was initially inspired by the PFP library for Haskell  
(see http://web.engr.oregonstate.edu/~erwig/pfp/, and in particular  
the first paper under "further information"), but ended up being  
quite different:

1) PFP uses lists of (value probability) pairs to represent  
distributions. Clojure's maps are a more natural fit, so I use maps  
from values to probabilities.

2) At the moment, I have only implemented deterministic  
transformations of finite probability distributions. PFP also offers  
random sampling, which I plan to add in the future.

3) I added a second monad, cond-dist, which allows a straightforward  
implementation of Bayesian filters.

4) A significant part of the PFP code does nothing else but hide the  
implementation details behind a few abstract data types. This makes  
the code much more difficult to understand. In Clojure we don't have  
to deal with types, so this overhead disappears.

Any feedback is welcome, as always!

Konrad.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to