MeasureTheory.jl
MeasureTheory.jl copied to clipboard
Change `bind` to `compound`?
For push-forwards, we have
pushfwd(f, m)
If the f of a pushforward is noisy, it becomes a kernel, and the pushforward becomes a compound measure:
https://en.wikipedia.org/wiki/Compound_probability_distribution
This is currently called bind, because it matches the monadic bind operation from functional programming. But bind is unfamiliar to most users.
Maybe this should instead be
compound(k, m)
where k is a kernel. For functions, we'd have
compound(f::Function, m::AbstractMeasure) = compound(kernel(f), m)
For more discussion, see https://github.com/cscherrer/MeasureTheory.jl/pull/226
I am torn, compound is more familiar to people, but somehow it obscures the compositional nature even more and I wouldn't know how to name the other compositions which are (kf)(x) = ∫ f(y) k(x, dy) and (k₁k₂)(x) = ∫∫ k₁(x,dy) k₂(y, dz)
Based on the Twitter discussion here we could also consider making kernels callable not just on values, but also on measures. Then composition of kernels would just be $\circ$, as usual.