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

Adding pushforward measures #54

Closed
oschulz opened this issue May 31, 2022 · 4 comments
Closed

Adding pushforward measures #54

oschulz opened this issue May 31, 2022 · 4 comments
Assignees

Comments

@oschulz
Copy link
Collaborator

oschulz commented May 31, 2022

A possible implementation would be a type PushforwardMeasure(f, μ) with a shorthand syntax ν = f.(μ) - this implies a monadic view of measures:

struct PushforwardMeasure{F,M} <: AbstractMeasure
    f::F
    orig::M
end

Random.rand(m::PushforwardMeasure) = m.f(rand(m.orig))

map(f, μ::AbstractMeasure) = PushforwardMeasure(f, μ)
Base.Broadcast.broadcasted(f, μ::AbstractMeasure) = map(f, μ)
@cscherrer cscherrer self-assigned this May 31, 2022
@oschulz oschulz changed the title Add pushforward measures Adding pushforward measures May 31, 2022
@oschulz
Copy link
Collaborator Author

oschulz commented Jun 1, 2022

PushforwardMeasure would be a generalization of MeasureTheory.Affine.

f would be expected to support ChangesOfVariables.with_logabsdet_jacobian, and should support InverseFunctions.inverse as well if possible.

@cscherrer
Copy link
Collaborator

Ok, we already have
https://github.com/cscherrer/MeasureTheory.jl/blob/master/src/combinators/transforms.jl

But maybe it can be generalized beyond TransformVariables

@oschulz
Copy link
Collaborator Author

oschulz commented Jun 1, 2022

But maybe it can be generalized beyond TransformVariables

I think that would be very important now that we have ChangesOfVariables.jl as a community standard (designed as a companion for InverseFunctions.jl).

@cscherrer
Copy link
Collaborator

Pushforwards need some updates (see #125), but since there is an implementation I'll close this issue

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