You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `logdensity`: The object that implements the LogDensityProblems.jl interface.
"""
struct LogDensityModel{L} <:AbstractModel
logdensity::L
functionLogDensityModel{L}(logdensity::L) where {L}
if LogDensityProblems.capabilities(logdensity) ===nothing
throw(
ArgumentError(
"The log density function does not support the LogDensityProblems.jl interface",
),
)
end
returnnew{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).
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.
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.
We currently have a type
ESSModel
that implements a factorised version oflogdensityproblem
.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
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
The text was updated successfully, but these errors were encountered: