Closed sdwfrost closed 8 years ago
Feel free to contribute @sdwfrost, these are useful extensions to RWM. A couple of comments:
Proposal
and RWMProposal
as abstract types, then define specific types for each proposal distribution. Alternatively we would use only a wrapper function called proposal()
to point to the user-chosen proposal mechanism. If the RWM definition changes drastically, we can define it then as a separate type RWMx()
, which is sth that @fredo-dedup has already started doing on the basis of the employed RWM tuning methods.Thanks for your participation @sdwfrost !
[ Normal(0,1) , Cauchy(0,1), ...]
scale
to accept distributions the code may be more compact, yet at the same time it won't be conceptually clear. In general, the distribution is naturally part of the proposal mechanism, not so directly implicated to scaling, so it may be more transparent not to fuse these two different aspects of the MCMC samplers...(3). has some conceptual similarity with sequential MC : run in succession different samplers on the same model; but with only a subset of parameters active on each sampler. It may be a good idea to follow that idea (generalize seq MC).
Yes, that makes more sense, and it is probably in your coding realm, since you have done the seqMC coding :)
@scidom - for Metropolis-within-Gibbs, I was really thinking more of attaching different samplers to different parameters of a model, then having a sampler that would go through each component of the model and update them separately.
How about 'IRWM' for an integer random walk sampler as a separate type?
For truncation, it would be nice to have a macro to truncate a distribution from Distributions.jl, in a similar way to what gen.trun does in the R library gamlss.tr; then, having a mechanism to specify the proposal distribution would be the same regardless of whether the distribution was truncated or not, whether a random walk sampler or an independence sampler, etc. was used.
@sdwfrost, assuming different samplers for different parameters is sth that we haven't considered before and it is important to update the package to include such functionality; please feel free to contribute any time as it would be great help. @fredo-dedup, what is your opinion on this?
IRWM
sounds good to me.
Yes, I agree with your suggestion about having a macro for truncating distributions - I think this should become part of the Distributions
package, and then we can invoke it from MCMC
. Would you like to file an issue in Distributions
about truncation and see what the rest of people think about it?
There was a truncate macro in Distributions, which we replaced with a Truncated type.
-- John
On Aug 27, 2013, at 9:27 AM, Theodore Papamarkou notifications@github.com wrote:
@sdwfrost, assuming different samplers for different parameters is sth that we haven't considered before and it is important to update the package to include such functionality; please feel free to contribute any time as it would be great help. @fredo-dedup, what is your opinion on this?
IRWM sounds good to me.
Yes, I agree with your suggestion about having a macro for truncating distributions - I think this should become part of the Distributions package, and then we can invoke it from MCMC. Would you like to file an issue in Distributions about truncation and see what the rest of people think about it?
— Reply to this email directly or view it on GitHub.
Regarding different samplers for each parameter, this is what WinBUGS and JAGS both do. The BUGS book has a nice description of how this is handled: sampler algorithms go through nodes in the graphical model looking for subgraphs to which they apply.
-- John
On Aug 27, 2013, at 9:27 AM, Theodore Papamarkou notifications@github.com wrote:
@sdwfrost, assuming different samplers for different parameters is sth that we haven't considered before and it is important to update the package to include such functionality; please feel free to contribute any time as it would be great help. @fredo-dedup, what is your opinion on this?
IRWM sounds good to me.
Yes, I agree with your suggestion about having a macro for truncating distributions - I think this should become part of the Distributions package, and then we can invoke it from MCMC. Would you like to file an issue in Distributions about truncation and see what the rest of people think about it?
— Reply to this email directly or view it on GitHub.
That's a very useful reference, didn't know about this book (it came out last year as it seems). If MCMC
is going to allow different samplers for each parameter, I think we should do it the BUGS way (ie using graphical models). By the way, is there any Julia code for graphical models?
I agree. I think we'll want to have a proper graphical model representation. I spent some time at Hacker School on this, but it needs a lot more work.
I'll write something up later this week so that others can see if anything I've done would be useful.
-- John
On Aug 27, 2013, at 10:05 AM, Theodore Papamarkou notifications@github.com wrote:
That's a very useful reference, didn't know about this book (it came out last year as it seems). If MCMC is going to allow different samplers for each parameter, I think we should do it the BUGS way (ie using graphical models). By the way, is there any Julia code for graphical models?
— Reply to this email directly or view it on GitHub.
Great, keep us posted about the graphical model coding.
Is there somebody working on extending RWM along the lines mentioned in the subject line of this issue? I am very interested to work on it. Especially the block-wise RWM. @johnmyleswhite I know of your package dealing with graphical models. Can you point me to the BUGS book where it is explained how they deal with component-wise RWM?
Chapter 12 of this book is a good start: http://www.amazon.com/The-BUGS-Book-Introduction-Statistical/dp/1584888490
You're most welcome to work on this @gragusa and we will happily integrate your contributions !
Do you have already a plan ? Are you thinking of an automated choice of sampler depending on the kind of parameters (like BUGS) or user supplied information ?
@fredo-dedup thank you. I think I should have some free time in the next couple of week and i will start working on it. I am leaning toward user supplied information since the problem I am thinking are non-standard enough that any automatic choice will result (generally) in poor results. But I have to carefully think this through though. We will see.
The new graph-based model is now ready to accommodate Gibbs and Metropolis-within-Gibbs relatively easily. I will only need to set up a Gibbs-related job over the next few weeks (which has been logged already as an issue). As for the truncated normal, we haven't added this functionality yet. I will close this issue and will split it into sub-issues to track it better.
@scidom and @fredo-dedup - Great job so far on MCMC.jl. I had already tweaked RWM.jl to accept a vector of scale parameters, but it looks as though you're already on top of this. A few requests (that I am happy to help with):