On 3/17/13 10:48 AM, Nigel/essence wrote:
> On Sunday, 17 March 2013 00:17:52 UTC, Andrew Gelman wrote:
>> Hi all.
>>
>> Here's a thought: What if we throw the "stan for discrete parameters" problem out into the world?
So much for "what if" :-) But hey, I'm all for throwing
everything out into the world, which is why Stan's open
source and our dev group's out in the open.
One reason we haven't done this is just time.
Also, we're already a bit overwhelmed trying to sort out
all the responses to helping us with Python.
This isn't like a bunch of independent research projects,
because all the code that goes into and around Stan needs
to be fairly tightly integrated. For instance, anyone dealing with discrete
parameters in any deeper way than option (1) below is going to be down in the
guts of our parser, code generator, and sampler interface, and so has to be
sure not to mess up anything that's there that already works.
Writing a new continuous sampler, like Yuanjun did, only
involves half the battle -- he needed to use all the interfaces
we have, but only really had tight integration with one class.
That is, new continuous samplers can be added pretty modularly
at this point.
Writing some new functions, like Peter's doing, is more isolated
still. There's nothing to integrate with other than to use
some of our libraries. He's working on Metropolis now, which is
ramping up to the next level of integration.
If we really want to start recruting more developers,
we're going to need to figure out some process to manage
the design and integration of the various parts. It's
a qualitatively different game when there are more than two or
three people working on a project and the various pieces can't
be made wholly modular.
Now, to get on the actual answer...
>> We could write a short document with our ideas (various possible approaches and the pluses and minuses of them) and
>> then maybe someone will go out and solve it. Or we could try to recruit a Ph.D. student, Columbia
>> or Harvard stat or Princeton CS. What do you think?
I can summarize pretty quickly with the same info as is
on our TO-DO list:
1. We use the entire log probability function to compute the
conditional probability of a discrete parameter up to a proportion, then
use:
a. (adaptive) slice sampling for count (unbounded) parameters
b. Gibbs (exact discrete) for categorical (bounded) parameters
PROS: very easy to implement
models look exactly as now, but allow discrete parmaeters
CONS: very very inefficient
2. Same as 1, but we try to find a less computationally
intensive way to compute the log conditional probability up to
a proportion
-- Andrew thinks there may be some way to calculate which parts
of the code need to be executed
PROS: models look like now
CONS: we can't figure out how to do it (remember that
Stan is Turing complete as a language)
An extreme approach would be to restrict to BUGS-like directed
graphical models so we can calculate the Markov blanket
-- Andrew thinks there may also be some way to annotate which
parts of the code need to be executed for each conditional
PROS: ??
CONS: we can't figure out how to do it;
users have to learn annotation language;
makes regular models uglier
3. Same as 1, but we introduce a new block to define the discrete
conditional probabilities
-- PROS: easy to implement;
very efficient
-- CONS: user has to write discrete model twice;
user has to caclulate Markov blanket, which if they get
wrong, leads to an inconsistent model
We can mitigate the consistency issue somewhat by imposing checks
of values up to a proportion, but only for finitely many inputs
4. Hope someone else is more clever than we are.
> It is certainly an interest in my area, plus a closely related issue of multi modal problems. They are not at all trivial!
>
> At present I am using DREAM-type techniques to do these, in combination with NUTS for the continuous variables.
Is there a paper on how to do ensemble methods like DREAM
for discrete parameters somewhere?
- Bob