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

Introduce r-norms on manifolds with components #206

Merged
merged 26 commits into from
Oct 19, 2024

Conversation

kellertuer
Copy link
Member

@kellertuer kellertuer commented Oct 18, 2024

For manifolds that consist of components, like product, power and default manifold, this introduces an additional parameter to distance to specify the outer norm to be used after computing the single components distances; this especially also covers the 1- and ∞-norm cases.
It also introduces a has_components function to be able to check whether a manifold can compute such an (outer) norm.

🛣️🗺️

  • ProductManifold
  • PowerManifold
  • DefaultManifold
  • adapt the idea also to norm
  • Documentation
  • News and version number
  • Testing / Code coverage

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.94%. Comparing base (7b52f31) to head (577a5ad).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #206      +/-   ##
==========================================
+ Coverage   99.90%   99.94%   +0.03%     
==========================================
  Files          31       31              
  Lines        3301     3398      +97     
==========================================
+ Hits         3298     3396      +98     
+ Misses          3        2       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@mateuszbaran mateuszbaran left a comment

Choose a reason for hiding this comment

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

A few comments.

src/DefaultManifold.jl Outdated Show resolved Hide resolved
src/DefaultManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/ProductManifold.jl Outdated Show resolved Hide resolved
src/ProductManifold.jl Outdated Show resolved Hide resolved
src/ProductManifold.jl Outdated Show resolved Hide resolved
src/ProductManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
@kellertuer
Copy link
Member Author

kellertuer commented Oct 19, 2024

I rephrased the docs and made more clearer, that r-norm only applies to the outer layer.

@kellertuer kellertuer added preview docs Add this label if you want to see a PR-preview of the documentation Ready-for-Review A label for pull requests that are feature-ready labels Oct 19, 2024
@kellertuer
Copy link
Member Author

Thanks for already fixing all the types (::Real). and defaults (to 2) – I hope I now found the last few tricky boundary cases, where functions are defined to avoid ambiguities.

Let's postpone the idea distance(M, p, q, m, Inf; recursive=true) to a later point. It could surely check whether any inner manifold has_components and for those cases pass the r down to them as well. But that would involve so many places I think (over 20?) that this would take me a day or two to find all the details. That is maybe not worth the effort for now, when I do not see who could find that useful.

@mateuszbaran
Copy link
Member

Thanks! Let's not do recursive r in this PR, or maybe at all.

@kellertuer
Copy link
Member Author

Can I merge this later today? I would like to maybe do the gradient change stopping criterion later today still, which was the origin for this feature.

Copy link
Member

@mateuszbaran mateuszbaran left a comment

Choose a reason for hiding this comment

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

Sure, I just have a few minor comments.

src/PowerManifold.jl Outdated Show resolved Hide resolved
src/PowerManifold.jl Outdated Show resolved Hide resolved
src/ProductManifold.jl Outdated Show resolved Hide resolved
src/ProductManifold.jl Outdated Show resolved Hide resolved
src/ProductManifold.jl Outdated Show resolved Hide resolved
test/power.jl Outdated Show resolved Hide resolved
@kellertuer kellertuer merged commit 6ac01d1 into master Oct 19, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview docs Add this label if you want to see a PR-preview of the documentation Ready-for-Review A label for pull requests that are feature-ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants