TuringLang / AbstractMCMC.jl

Abstract types and interfaces for Markov chain Monte Carlo methods
https://turinglang.org/AbstractMCMC.jl
MIT License
78 stars 18 forks source link

Consider transfering the `ESSModel` to `AbstractMCMC` #112

Open yebai opened 1 year ago

yebai commented 1 year ago

We currently have a type ESSModel that implements a factorised version of logdensityproblem.

Now that we have the following new type, does it make sense to generalise and transfer the ESSModel type into this package?

https://github.com/TuringLang/AbstractMCMC.jl/blob/50cdf04980ebed131d19768453a2ff3226dc068f/src/logdensityproblems.jl#L11-L25

In addition, this factorisation is also helpful for other samplers like nested sampling (see NestedModel) and tempering methods (e.g. when we only temper the likelihood term).

cc @torfjelde @devmotion @mileslucas

devmotion commented 1 year ago

Maybe it would be better to not have a dedicated model but a special log density function type with the desired factorization that can be used in LogDensityModel. Then it should be possible to use the same model with e.g. EllipticalSliceSampling and AdvancedHMC.

torfjelde commented 1 year ago

I guess this is somewhat related to parts of the discussion in #85.

Maybe it would be better to not have a dedicated model but a special log density function type with the desired factorization that can be used in LogDensityModel.

This seems like a sensible approach :+1: