8000 matrices.py: add 'full_matrices=False' to svd call by ambellan · Pull Request #1546 · geomstats/geomstats · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

matrices.py: add 'full_matrices=False' to svd call #1546

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

Merged
merged 1 commit into from
May 24, 2022

Conversation

ambellan
Copy link
Contributor

Description

The align method in geomstats/geometry/pre_shape.py invokes align_matrices from matrices.py that employs singular value decomposition for which autodiff fails if a full set of left/right singular vectors are requested. However, providing the flag 'full_matrices=False' to svd avoids this pitfall and yields the same alignment.

Issue

This pull request fixes the issue autodiff fails on svd in matrices.py #1545.

Additional context

The issue originally appeared in the ICLR Computational Geometry & Topology Challenge 2022 when trying to perform geodesic regression in Kendall shape space.

@codecov
Copy link
codecov bot commented May 24, 2022

Codecov Report

Merging #1546 (3b6b1d7) into master (f1a563a) will increase coverage by 0.86%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1546      +/-   ##
==========================================
+ Coverage   90.39%   91.24%   +0.86%     
==========================================
  Files          98      103       +5     
  Lines        9776     9983     +207     
==========================================
+ Hits         8836     9108     +272     
+ Misses        940      875      -65     
Flag Coverage Δ
autograd 90.39% <100.00%> (ø)
numpy 87.15% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
geomstats/geometry/matrices.py 97.26% <100.00%> (ø)
geomstats/information_geometry/gamma.py 90.94% <0.00%> (-0.33%) ⬇️
geomstats/_backend/numpy/common.py 88.89% <0.00%> (ø)
geomstats/_backend/numpy/linalg.py 94.24% <0.00%> (ø)
geomstats/_backend/numpy/__init__.py 97.75% <0.00%> (ø)
geomstats/_backend/numpy/random.py 100.00% <0.00%> (ø)
geomstats/_backend/numpy/autodiff.py 90.00% <0.00%> (ø)
geomstats/learning/expectation_maximization.py 89.45% <0.00%> (+1.12%) ⬆️
geomstats/geometry/stratified/graph_space.py 53.03% <0.00%> (+1.35%) ⬆️
geomstats/_backend/__init__.py 77.78% <0.00%> (+3.18%) ⬆️
... and 2 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 f1a563a...3b6b1d7. Read the comment docs.

Copy link
Collaborator
@ninamiolane ninamiolane left a comment

Choose a reason for hiding this comment

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

Fantastic, thank you!

@ninamiolane ninamiolane merged commit 92e0e77 into geomstats:master May 24, 2022
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.

2 participants
0