8000 Add FlatRiemannianMetric and fix EuclideanMetric inheritance by luisfpereira · Pull Request #1946 · geomstats/geomstats · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add FlatRiemannianMetric and fix EuclideanMetric inheritance #1946

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 3 commits into from
Feb 19, 2024

Conversation

luisfpereira
Copy link
Collaborator
@luisfpereira luisfpereira commented Feb 5, 2024

This PR splits EuclideanMetric into FlatRiemannianMetric and the usual EuclideanMetric. The first is a flat metric whose metric_matrix can be different from the usual Euclidean metric. The second assumes the metric matrix is gs.eye(dim).

See next PRs for further justification for this split.

Copy link
codecov bot commented Feb 5, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (ef340b9) 91.51% compared to head (7a18434) 91.34%.
Report is 10 commits behind head on main.

Files Patch % Lines
geomstats/geometry/flat_riemannian_metric.py 95.59% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1946      +/-   ##
==========================================
- Coverage   91.51%   91.34%   -0.16%     
==========================================
  Files         149      146       -3     
  Lines       13624    13450     -174     
==========================================
- Hits        12466    12284     -182     
- Misses       1158     1166       +8     
Flag Coverage Δ
autograd ?
numpy 89.34% <97.30%> (-0.86%) ⬇️
pytorch 85.55% <97.30%> (-<0.01%) ⬇️

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

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

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.

Could the distinction EuclideanMetric and StandardEuclideanMetric be hidden for the user? As a user, if I want the standard euclidean metric, I will search the library for EuclideanMetric, see that there is something, and try to use that.

Could one of them be private, and only a single class EuclideanMetric be accessible, such that this class dispatches between the Standard and the Matrix euclidean metrics?

At the very least the docstrings should explain the difference between the two.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@luisfpereira luisfpereira changed the title Add StandardEuclideanMetric and fix EuclideanMetric inheritance Add FlatRiemannianMetric and fix EuclideanMetric inheritance Feb 12, 2024
8000
@luisfpereira
Copy link
Collaborator Author

@ninamiolane, I'm using FlatRiemannianMetric term and keeping EuclideanMetric. Now it should be easier to disambiguate.

@luisfpereira luisfpereira merged commit 3222c7d into geomstats:main Feb 19, 2024
@luisfpereira luisfpereira deleted the standard-euclidean branch February 19, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0