-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
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?
AbstractMCMC.jl/src/logdensityproblems.jl
Lines 11 to 25 in 50cdf04
- `logdensity`: The object that implements the LogDensityProblems.jl interface. | |
""" | |
struct LogDensityModel{L} <: AbstractModel | |
logdensity::L | |
function LogDensityModel{L}(logdensity::L) where {L} | |
if LogDensityProblems.capabilities(logdensity) === nothing | |
throw( | |
ArgumentError( | |
"The log density function does not support the LogDensityProblems.jl interface", | |
), | |
) | |
end | |
return new{L}(logdensity) | |
end | |
end |
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).
Metadata
Metadata
Assignees
Labels
No labels