Description
While consider PR's like #365, #366
I come to think that the best architecture is to have
a class interface that is responsible provide new samples. I.e.
RSlice, RWalk and so forth. The goal of this would be to simplify adding new samplers, like ensemble sampling.
Also in theory that would enable passing samplers directly to NestedSampler() at construction, i.e.
NestedSampler(sampler=RSlice(slices=4))
This encapsulation potentially also will do the tuning inside those classes. Currently the tuning of proposals is sort of done at high level like here
dynesty/py/dynesty/nestedsamplers.py
Line 140 in 2236388
Another possible benefit is to enable combining samplers, like
NestedSampler(sampler=[RSlice(slices=4),Rwalk(waks=5)])
The key questions is what exactly the interface of those samplers should be.
I.e. for example, it is not clear to me that is useful to keep the separation of 'propose live-point' vs 'evolve live-point' methods or whether each method should just do the job of
- You are provided with a list of points subject to L>L*
- You are optionally provided with a list of ellipsoids
- You need to provide a new point subject to L>L*
Also, it is not quite clear how much state should be preserved in those samplers, and whether it can be a problem for multi-core runs, if we have to send/pickle those samplers, as well as what should be done with those sampler states on different cpus.
ATM this is not a very concrete proposal, more of an RFC.
In the simplest form, the proposal would just bundle sample_rwalk(), sample_rslice() into
sample() methods of a class, but that's an easy part.
Activity