-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
Hi Chad,
I was just checking out the new version and noticed I was getting an inconsistent answer. Here is an MWE
using MeasureTheory
import Distributions as Dists
using LinearAlgebra
μ = zeros(2)
Σ = [1.0 0.0; 0.0 2.0]
Ω = [1.0 0.0; 0.0 0.5]
σC = cholesky(Σ)
ωC = cholesky(Ω)
dd = Dists.MvNormal(μ, Σ)
d1 = MvNormal{(:μ, :σ)}((μ=μ, σ=σC.L))
d2 = MvNormal{(:μ, :ω)}((μ=μ, ω=ωC.L))
d3 = Affine(AffineTransform((;μ, σ=σC.L)), Normal()^2)
# I expect this to give -0.5 log((2π)^2 * 2) ≈ -2.1845
logdensityof(dd, zeros(2)) # ≈ -2.1845
logdensityof(d1, zeros(2)) # ≈ -3.676
logdensityof(d2, zeros(2)) # ≈ -3.676
logdensityof(d3, zeros(2)) # ≈ -3.676
From my poking around, it looks like the log jacobian of the affine transform isn't being included in the density calculation, and inv(2pi)
is being included twice: once in the basemeasure density and a second time in the proxy call.
Metadata
Metadata
Assignees
Labels
No labels