Closed ben18785 closed 4 years ago
This is a more thorough description of DRAM. Interesting in that, by allowing multiple proposals (and rejections), it is possible to incorporate kernels that search both short and long distances, and also allows the ratio between short and long proposals to change over time: potentially you'd want to do longer steps to begin with to globally explore, followed by shorter steps later on when you're more confident in what you've found.
I see no problem of using DRAM in tempered sampling methods like SMC and population MCMC.
@MichaelClerx @martinjrobins A difficulty with this may be how to fit it into ask/tell. Since we would be repeatedly calling ask (albeit with potentially different kernels) for one given iteration. What do you think?
I think we could alter the scheme to work like this:
chain = []
for iteration in range(1, max_iter):
sample = None
while sample is None:
x = sampler.ask()
fx = evaluate(x)
sample = sampler.tell(fx)
chain.add(sample)
so that the sampler could ask for multiple evaluations before returning a new sample.
Sorry being slow here... Is None what the sampler returns if it rejects the proposal?
On 28 Mar 2018, at 09:49, Michael Clerx notifications@github.com wrote:
I think we could alter the scheme to work like this:
chain = [] for iteration in range(1, max_iter): sample = None while sample is None: x = sampler.ask() fx = evaluate(x) sample = sampler.tell(fx) chain.add(sample) so that the sampler could ask for multiple evaluations before returning a new sample.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
No it returns the next sample in the chain! So if it accepts or rejects a sample it returns the next sample in the chain (the proposal if accepted, else the previous sample). If it's not in a position to accept/reject yet it returns None
.
Ok, makes sense. I think I see how to proceed here, thanks.
On 29 Mar 2018, at 16:17, Michael Clerx notifications@github.com wrote:
No it returns the next sample in the chain! So if it accepts or rejects a sample it returns the next sample in the chain (the proposal if accepted, else the previous sample). If it's not in a position to accept/reject yet it returns None.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or mute the thread.
Great! Note that the above scheme isn't actually implemented yet, just saying that's how we could do it :D
The place to make changes would be in the docs here: https://github.com/pints-team/pints/blob/master/pints/_mcmc/__init__.py#L77-L83 And here: https://github.com/pints-team/pints/blob/master/pints/_mcmc/__init__.py#L205-L211
Then update the code here: https://github.com/pints-team/pints/blob/master/pints/_mcmc/__init__.py#L398-L416
And run all the tests to check if all the samplers still work. Would advise doing this in a separate ticket if we find it's really necessary! Thoughts @martinjrobins ?
No new thoughts from me, what you suggest sounds sensible.
Described here.