On Nov 18, 8:05 am, Konrad Hinsen <googlegro...@khinsen.fastmail.net>
wrote:
> --On 17 novembre 2011 15:09:11 -0800 Nils Bertschinger
>
> <nils.bertschin...@googlemail.com> wrote:
> > The two approaches are somewhat complementary to each other. Your
> > monad does exact inference on discrete distributions by running
> > through all possibilities. Mine is sampling based and does approximate
> > inference using MCMC.
>
> I tried that approach as well:
>
> https://github.com/richhickey/clojure-contrib/blob/master/src/main/cl...
>
> but I never used it much because for my own applications, exact inference
> was very doable. I'll check out yours for comparison!

Just checked your implementation, the stream approach is indeed quite
nice to thread random numbers through programs. It seems that I handle
downstream conditioning somewhat different. The stream can basically
be filtered to implement rejection sampling, whereas I thread a
database state through the program to record all random choices (as
well as their probability) that have been taken. That way conditioning
does not have to be based on rejection, but is simply accounted for by
including the probability of the conditioned value. Then I can propose
a change to this database store, re-run the program and implement
Metropolis Hastings sampling on top of this, i.e. test whether the
change increased the probability of the random decisions taken
throughout the program and either accept or reject it accordingly.
Your stream approach can probably be nicely extended to particle
filters. I'll think about that ...

Nils
>
> 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
Note that posts from new members are moderated - please be patient with your 
first post.
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