JuliaMath / JuliaMath/MeasureBase.jl

More density stuff

Open
#106 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
32
Forks
4
PR merge metrics
No merged PRs in 30d

Description

MeasureTheory has these tests:
```julia

@testset "Density measures and Radon-Nikodym" begin
x = randn()
let d = ∫(𝒹(Cauchy(), Normal()), Normal())
@test logdensity_rel(d, Cauchy(), x) ≈ 0 atol = 1e-12
end

let f = 𝒹(∫(x -> x^2, Normal()), Normal())
@test f(x) ≈ x^2
end

let d = ∫exp(log𝒹(Cauchy(), Normal()), Normal())
@test logdensity_rel(d, Cauchy(), x) ≈ 0 atol=1e-12
end

let f = log𝒹(∫exp(x -> x^2, Normal()), Normal())
@test f(x) ≈ x^2
end
end
```

The ones with `let f` pass just fine. But the `let d` ones fail. It seems like it's still kind of messy. What's the best way to get this working?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.