From h.wickham at gmail.com  Mon Mar 24 13:45:50 2008
From: h.wickham at gmail.com (hadley wickham)
Date: Mon, 24 Mar 2008 07:45:50 -0500
Subject: [Rd] idea for GSoC: an R package for fitting Bayesian
	Hierarchical Models
In-Reply-To: <b0808fdc0803240247j767614ebm116100a9e8944f2e@mail.gmail.com>
References: <b0808fdc0803210956k5b967d6paa9e572f72482df@mail.gmail.com>
	<b0808fdc0803220410n1b3fbc08k4f837a3355d04096@mail.gmail.com>
	<loom.20080324T013004-719@post.gmane.org>
	<b0808fdc0803240247j767614ebm116100a9e8944f2e@mail.gmail.com>
Message-ID: <f8e6ff050803240545u1413608ek2dbeb5238d6f47bb@mail.gmail.com>

>  Ya. But speeds are rather different.
>  I admittely missed a comparison with Umacs in my short demo.
>  However, from some early experiments (I'm doing while I'm writing), as
>  I suspected, my approach results being many times faster than Umacs,
>  even if one doesn't specify samplers as C code. Things goes even
>  better for my demo implementation if one tries to plug in samplers
>  specified as pure C code, which would further eliminate a lot of
>  memory allocations/deallocations behind those "rnorm()".
>
>  My aim is to obtain something which achieves decent speed, compared
>  with JAGS. I mean, I can easily experiment new samplers by using an
>  interpreted language, but if at the end I obtain something which is
>  *many* times slower than JAGS (which is moreover much more robust and
>  easier to work with), the whole stuff results being of little pratical
>  interest.
>
>  More: how can one really experiment a new custom sampler if doing some
>  thousands iterations takes forever, so that checking your sampler
>  pratical behaviour is a pain (I speak about my personal experience)?
>  That's why I want to always keep attention on speed, and give the
>  possibility to the user to either use R or C code at his choice, with
>  the ability to modify model node values in place, without unneeded
>  'malloc's. Ya, I would abandon pure functional style...

There is some interesting work being done on this topic in computer
science - e.g.

@inproceedings{keller:2008,
	Author = {Keller, Gabriele and Chaffey-Millar, Hugh and Chakravarty,
Manuel M. T. and Stewart, Don and Barner-Kowollik, Christopher},
	Booktitle = {Proceedings of the Tenth International Symposium on
Practical Aspects of Declarative Languages},
	Title = {Specialising Simulator Generators for High-Performance
Monte-Carlo Methods},
        Url = {http://www.cse.unsw.edu.au/~chak/project/polysim/},
	Year = {2008}
}

which explores a way to define a simulation at a high-level and then
compile it down to fast low-level primitives.  This seems like an
interesting approach, but I suspect you would struggle to find
students with the requisite statistical and computational backgrounds.

Hadley


-- 
http://had.co.nz/



[Rd] idea for GSoC: an R package for fitting Bayesian Hierarchical Models
hadley wickham