-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
The methods in this package keep track of absolute log Jacobian determinants by returning an extra value. This is somewhat brittle, I am proposing an alternative way of doing it.
Let
import Distributions: logpdf
struct LogJacVariate{T,S}
x::T
logjac::S
end
logpdf(d, v::LogJacVariate) = logpdf(d, v.x) + v.logjacThen the API that replaces transform_and_logjac would just return a LogJacVariate.
Caveats: Distributions.jl is a heavy dependency. Factoring out the core, as proposed eg in JuliaStats/Distributions.jl#1139, would make this much easier.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels