- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4
Open
Description
Say we have
using MeasureTheory, MeasureBase, BenchmarkTools, AffineMaps
μ = Normal(3.0, 2.0)
ν = pushfwd(MulAdd(2.0, 3.0), StdNormal())
x = rand(Normal(3.0, 2.0) ^ 100);Then benchmarking gives
julia> @btime logdensityof($μ  ^ 100, $x)
  60.594 ns (0 allocations: 0 bytes)
-222.1504504107993
julia> @btime logdensityof($ν ^ 100, $x)
  12.734 μs (12 allocations: 192 bytes)
-222.15045041079918I'm also confused by the basemeasure sequence here:
julia> basemeasure_sequence(ν) .|> println;
PushforwardMeasure(MulAdd{Float64, Float64}(2.0, 3.0), StdNormal())
PushforwardMeasure(MulAdd{Float64, Float64}(2.0, 3.0), 0.3989 * MeasureBase.LebesgueBase())
PushforwardMeasure(MulAdd{Float64, Float64}(2.0, 3.0), MeasureBase.LebesgueBase())I'd think there are always a couple of laws in place around these things:
logdensity_def(μ, x) == logdensity_rel(μ, basemeasure(μ), x)
logdensity_rel(pushfwd(f, μ), pushfwd(f, ν), x) == logdensity_rel(μ, ν, inverse(f)(x))But then we'd expect logdensityof(ν, x) == logdensityof(StdNormal(), x), which is not the case.
@oschulz any idea what's going on here?
Metadata
Metadata
Assignees
Labels
No labels