BayesianTools icon indicating copy to clipboard operation
BayesianTools copied to clipboard

feature request: custom proposals?

Open nmatzke opened this issue 8 years ago • 2 comments

Hi -- I have been starting to use BayesianTools and it is AMAZING. Congrats on such an exciting tool.

I am sure you folks are very busy, and so I totally understand if this idea goes far down the list of your priorities, but: I wonder if it might be possible to allow users to add some custom proposals / moves to the default ones available for a particular MCMC. For complex likelihood models with many parameters (~100), changing the parameters one-at-a-time has its limits. I know that you have DREAM and DREAMzs in there, and I've been experimenting with DREAMzs, but it still seems to mix very poorly. I suspect it might help a lot if the user, knowing something about their model/data, could put in a proposal that would, say, move a block of parameters in the same direction at once, or move some parameters up while moving other parameters down.

This might be as simple as letting the user input some supplementary, pre-defined Z matrices to represent these moves, e.g. the user puts in 0.5 for parameters that they think should move together in a particular proposal, 0s for those that shouldn't, and (say) -0.5 for parameters that should move in the opposite direction from each other. (This all assumes I'm understanding the Z-matrix correctly, as a correlation matrix for the parameters -- which I may not.)

Anyway, like I said, feel free to ignore the idea, but I wanted to put it out there at least, in case someone gets interested in it, or perhaps might get interested in it in the future.

Cheers, Nick

nmatzke avatar May 23 '17 12:05 nmatzke

Hey Nick (@nmatzke), thanks for your suggestion. Glad you like the package! About your question: Currently there is the possibility to update parameter blocks in the DE(zs) sampler. Insted of random subset as this is being done in DREAM(zs) you can either update blocks based on correlations or define your own blocks. You'll find some more information in the help page of DE(zs). Hope this helps a bit. Best, Stefan

stefan-paul avatar May 23 '17 13:05 stefan-paul

To add to this - there are also some advanced options to tune the Gibbs update in the Metropolis (e.g. to move more than 1 parameter at a time, see help). Also, the Metropoli actually allows custom proposal functions, as long as they have the same interface as the built-in proposal. However, this is not properly documented, and we don't check user-provided functions, so I would not recommend it at the moment.

Nick, would be good to get your feedback if you play around with these things.

Independent of that, we could put

  • unify blocking options across samplers
  • provide the possibility to specify custom proposals

on the list of long-term goals - until this this is better specified, I'll keep this ticket open.

florianhartig avatar May 23 '17 13:05 florianhartig