Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change bind to compound? #227

Open
cscherrer opened this issue Aug 22, 2022 · 2 comments
Open

Change bind to compound? #227

cscherrer opened this issue Aug 22, 2022 · 2 comments

Comments

@cscherrer
Copy link
Collaborator

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 #226

@mschauer
Copy link
Member

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)

@cscherrer
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants