Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing an elliptical slice sampler #426

Closed
mvsoom opened this issue Mar 2, 2023 · 2 comments
Closed

Implementing an elliptical slice sampler #426

mvsoom opened this issue Mar 2, 2023 · 2 comments
Labels
question questions about stuff

Comments

@mvsoom
Copy link

mvsoom commented Mar 2, 2023

I want to implement a custom slice sampler, namely the elliptical slice sampler (ESS). Context: I have a problem with Gaussian priors for which ESS works well and I would like to check if I can transport this efficiency to nested sampling.

I was browings the code today to see whether it would be possible. It seems like I only have to reimplement the generic_slice_step function. Is that right (first question)? Does slice sampling in dynesty take into account the bounding distributions as is done for example in generic_random_walk (second question)?

Thanks!

@mvsoom mvsoom added the question questions about stuff label Mar 2, 2023
@segasai
Copy link
Collaborator

segasai commented Mar 2, 2023

Hi,

My suggestion is to implement the
sample_ellslice similarly to sample_rwalk, sample_rslice.
Then you should be able to provide that function directly to dynesty.NestedSampler, i.e.
NestedSampler(sample=sasmple_ellslice)

Regarding the existing slice sampling, yes it does take into account boundaries, it is used to choose the scale of the step, and 'metric' (using the ellipsoid parameters to generate random directions)

Also, I'll say that I am hoping to rewrite/restructure the sampling structure in dynesty ( #391 ) to make it more easy to add new samplers, so the integration of the new sampler into dynesty (if that's your goal), may wait till this is implemented.

@mvsoom
Copy link
Author

mvsoom commented Mar 2, 2023

OK, thanks for the reply!

@mvsoom mvsoom closed this as completed Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question questions about stuff
Projects
None yet
Development

No branches or pull requests

2 participants