femtomc / Jaynes.jl

E.T. Jaynes home phone.
https://femtomc.github.io/Jaynes.jl
Apache License 2.0
45 stars 1 forks source link

Construct exchange kernel #39

Open femtomc opened 4 years ago

femtomc commented 4 years ago

To use native inference algorithms in Soss or Gen (and eventually Turing), there needs to be an interface to selectively regenerate a call site with a user-provided kernel.

This is different than MH, which recursively calls regenerate at call sites. Instead, exchange should extract a call site at an address, apply a kernel to the call site, obtain the new selection at the call site and update the original call site if the regeneration is accepted.

With this interface in place, the full suite of algorithms from other PPL libraries will be available for usage through the foreign model interface.

femtomc commented 4 years ago

First version: https://github.com/femtomc/Jaynes.jl/blob/master/src/inference/ex.jl