JuliaMath / JuliaMath/DensityInterface.jl

Interoperability with MeasureTheory

Open
#5 37 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
12
Forks
2
PR merge metrics
No merged PRs in 30d

Description

For use with MeasureTheory, it would be helpful if we could write `logfuncdensity(log_f, base)`, with expected behavior
```julia
logdensityof(logfuncdensity(log_f, base), x) == log_f(x) - logdensityof(base, x)
```

This would allow us to write
```julia
DensityInterface.logfuncdensity(log_f, base::Measure) = MeasureTheory.∫exp(log_f, base)
```

I know this package doesn't want base measures to be a requirement, so maybe we could find a way to make `base` optional.

`∫exp` is also defined for Distributions; it's not clear to me yet how to extend the interface to cover that case.

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.