-
Notifications
You must be signed in to change notification settings - Fork 43
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
More friendly default sample
interface
#313
Comments
@sethaxen any thoughts on how to design this API better? |
cc @devmotion |
But that interface is supported, no? After #301 ? |
I think we still need to explicitly construct the |
Nah, you can just construct the |
@torfjelde can you give an example of what you mean? In my view a user should be able to entirely configure the warm-up period and sampling period without requiring they specify initializations for step size, metric, and initial point, but allowing for the possibility that they specialize the initializations. It should also be really easy to configure the warm-up phase(s). e.g. it should be possible to make initial step size selection part of the warm-up phase. It should be possible to initialize the sampling with a metric of one type but then adapt a different type of metric. Maybe some of these are already possible. If so, awesome! It would be handy to document such cases. If it becomes possible to use Turing models directly with the sampler without needing to define a new sampler as Turing does, that would be amazing! |
That's one nice goal for Turing (a by-product of the goal we want thoroughly decouple model specification and inference). We are very close to that point! |
I looked at @devmotion, maybe we can make the |
AbstractMCMC does not restrict how samplers want their options to be specified, it only adds some standard options such as Generally, I think there's not a single design choice that's used everywhere in the ecosystem. SciML (in most places) uses a large set of (non-nested) keyword arguments, DynamicHMC nests some options in NamedTuple (I guess this might be useful mostly in cases where you have some hierarchy of options), and Optim supports options as |
We should consider supporting the following
AbstractMCMC.sample
interface (defined here)This allows users to pass a
LogDensityProblem
to thesample
function instead of ahamiltonian
object. We could default to Gaussian Kinect energy and canonical moment refreshment scheme. Moreover, we should define a few off-the-shelfsampler
types rather than requiring the user to construct anHMC
kernel from technically frightening components likeleapfrog
and trajectorytermination
types.Such an intuitive
sample
interface can even be helpful forTuring
models, allowing users to run MCMC without using out-of-date glue interfaces (correctly) criticised here.AdvancedMH
: Remove explicit use of LogDensityModel AdvancedMH.jl#76The text was updated successfully, but these errors were encountered: