Skip to content

Add variate transport#62

Merged
oschulz merged 70 commits into
JuliaMath:masterfrom
oschulz:transforms
Jun 19, 2022
Merged

Add variate transport#62
oschulz merged 70 commits into
JuliaMath:masterfrom
oschulz:transforms

Conversation

@oschulz

@oschulz oschulz commented Jun 15, 2022

Copy link
Copy Markdown
Collaborator

No description provided.

@oschulz oschulz requested a review from cscherrer June 15, 2022 14:06
@oschulz oschulz marked this pull request as draft June 15, 2022 14:06
@github-actions

Copy link
Copy Markdown
Package name latest stable
MeasureTheory.jl

@github-actions

Copy link
Copy Markdown
Package name latest stable
MeasureTheory.jl

@codecov

codecov Bot commented Jun 15, 2022

Copy link
Copy Markdown

Codecov Report

Merging #62 (a8faa66) into master (bf7eae6) will increase coverage by 8.53%.
The diff coverage is 78.57%.

@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
+ Coverage   39.02%   47.55%   +8.53%     
==========================================
  Files          34       37       +3     
  Lines         756      942     +186     
==========================================
+ Hits          295      448     +153     
- Misses        461      494      +33     
Impacted Files Coverage Δ
src/MeasureBase.jl 60.00% <ø> (ø)
src/insupport.jl 0.00% <0.00%> (ø)
src/transport.jl 63.88% <63.88%> (ø)
src/combinators/transformedmeasure.jl 71.42% <80.64%> (+71.42%) ⬆️
src/getdof.jl 87.50% <87.50%> (ø)
src/interface.jl 96.29% <94.11%> (-3.71%) ⬇️
src/combinators/power.jl 84.90% <100.00%> (+12.40%) ⬆️
src/combinators/weighted.jl 81.81% <100.00%> (+2.87%) ⬆️
src/primitives/dirac.jl 70.58% <100.00%> (+9.04%) ⬆️
src/primitives/lebesgue.jl 80.95% <100.00%> (+4.48%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf7eae6...a8faa66. Read the comment docs.

@cscherrer cscherrer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @oschulz ! I have some questions, may have a better basis for review after I understand some things better

Comment thread src/effndof.jl Outdated
Comment thread src/effndof.jl Outdated
Comment thread src/effndof.jl Outdated
Comment thread src/insupport.jl Outdated
Comment thread src/vartransform.jl Outdated
Comment thread src/vartransform.jl Outdated
Comment thread src/vartransform.jl Outdated
Comment thread src/vartransform.jl Outdated
Comment thread src/vartransform.jl Outdated
@github-actions

Copy link
Copy Markdown
Package name latest stable
MeasureTheory.jl

@github-actions

Copy link
Copy Markdown
Package name latest stable
MeasureTheory.jl

@github-actions

Copy link
Copy Markdown
Package name latest stable
MeasureTheory.jl

@github-actions

Copy link
Copy Markdown
Package name latest stable
MeasureTheory.jl

@github-actions

Copy link
Copy Markdown
Package name latest stable
MeasureTheory.jl

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

If we want to stress the transport aspect, I'd suggest transport_map(nu, mu) or gettransport(nu, mu) (with transport_def(nu, mu, x) for the internal function, and nu the target and mu the source).

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

Ok, new list for bikeshedding:

  • transformation_to(nu, mu)
  • transformation_map(nu, mu)
  • transport_to(nu, mu)
  • transport_map(nu, mu)

I like the ones with _to better, but I'm Ok with all of them.

@cscherrer , @mschauer , any picks?

@cscherrer

Copy link
Copy Markdown
Collaborator

I think it's important to try to distinguish between a measure transformation and a support transformation (that can be pushed forward or pulled back for some measure). And the to/from thing could be confusing.

If the concept of a transport is meaningful when the spaces are different, I like transport_to

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

I think it's important to try to distinguish between a measure transformation and a support transformation (that can be pushed forward or pulled back for some measure). And the to/from thing could be confusing.

If the concept of a transport is meaningful when the spaces are different, I like transport_to

If I read https://en.m.wikipedia.org/wiki/Transportation_theory_(mathematics) correctly, the spaces can be different. Correct, @mschauer?

We do not guarantee that we return an optimal transport, though (we shovel the earth correctly but not necessarily with minimum effort).

@mschauer

Copy link
Copy Markdown
Member

Exactly, we also don’t promise an optimal transport, right? :-)

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

Exactly, we also don’t promise an optimal transport, right? :-)

Indeed no, just a "correct transport, not an optimal one.

@cscherrer

Copy link
Copy Markdown
Collaborator

@mschauer if we change to transport_to do you think we're good to go?

I'm going to be out for a while, so once you're both happy with this please go ahead and merge, and tag a release

@mschauer

Copy link
Copy Markdown
Member

I should not tag releases on the phone but I am happy with the PR

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

I should not tag releases on the phone but I am happy with the PR

Ok, let me do the rename, then we'll tag?

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

Ok, renamed, let's see if CI goes through.

@mschauer Ok like this?

@github-actions

Copy link
Copy Markdown
Package name latest stable
MeasureTheory.jl

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

Ah, stop, need to rename vartransform_origin to

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

Ok rename complete.

@github-actions

Copy link
Copy Markdown
Package name latest stable
MeasureTheory.jl

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

I should not tag releases on the phone but I am happy with the PR

I can do the squash-merge, increase version number and tag, if there are no objections?

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

This will be v0.11.0, not v0.10.1, right?

@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

This will be v0.11.0, not v0.10.1, right?

Ah, yes - has to be, since it moves out StdNormal.

@github-actions

Copy link
Copy Markdown
Package name latest stable
MeasureTheory.jl

@oschulz oschulz merged commit 648376d into JuliaMath:master Jun 19, 2022
@oschulz oschulz deleted the transforms branch June 19, 2022 21:27
@oschulz

oschulz commented Jun 19, 2022

Copy link
Copy Markdown
Collaborator Author

Released. :-)

@oschulz oschulz changed the title Add vartransform Add variate transport Jun 20, 2022
@oschulz

oschulz commented Jun 20, 2022

Copy link
Copy Markdown
Collaborator Author

I apologize, I overlooked one name - we still have the VarTransform type. Should I make a v0.12 (we could name it to TransportFunction? It's not a type users will interact with much, but maybe best to fix that naming inconsistency now instead of later?

@oschulz

oschulz commented Jun 20, 2022

Copy link
Copy Markdown
Collaborator Author

I did a grep for var ... we also forgot about test_vartransform, NoTransport, checked_var, NoVarCheck and a few internal functions during the rename (oops).

@oschulz

oschulz commented Jun 20, 2022

Copy link
Copy Markdown
Collaborator Author

#63 should fix it - grep shows no remaining "...var..." where it doesn't belong.

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

Successfully merging this pull request may close these issues.

3 participants