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

Fix heat scaling #481

Merged
merged 8 commits into from
Dec 27, 2023
Merged

Fix heat scaling #481

merged 8 commits into from
Dec 27, 2023

Conversation

guillaumehu
Copy link
Collaborator

@guillaumehu guillaumehu commented Dec 21, 2023

@MUCDK noticed that the Chebyshev approximation was producing results different than another library.

This PR fixes the scaling of the eigenvalue needed to compute the coefficients of the polynomials. There was also a problem with the eigenvalue of the rescaled Laplacian; we computed the coefficients with the eigenvalue prior to the rescaling. We now use the eigenvalue of the rescaled Laplacian (always equal to 2.0) .

Now we also test if the approximated heat kernel is close to the ground truth one.

@guillaumehu guillaumehu marked this pull request as ready for review December 21, 2023 22:40
@guillaumehu guillaumehu marked this pull request as draft December 21, 2023 22:45
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (38a1625) 90.53% compared to head (1b145f0) 90.53%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #481   +/-   ##
=======================================
  Coverage   90.53%   90.53%           
=======================================
  Files          60       60           
  Lines        6549     6549           
  Branches      933      933           
=======================================
  Hits         5929     5929           
  Misses        472      472           
  Partials      148      148           
Files Coverage Δ
src/ott/geometry/geodesic.py 92.22% <100.00%> (ø)

Copy link
Collaborator

@michalk8 michalk8 left a comment

Choose a reason for hiding this comment

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

Thanks a lot @guillaumehu , just minor comments!

src/ott/geometry/geodesic.py Show resolved Hide resolved
src/ott/geometry/geodesic.py Outdated Show resolved Hide resolved
src/ott/geometry/geodesic.py Outdated Show resolved Hide resolved
tests/geometry/geodesic_test.py Outdated Show resolved Hide resolved
tests/geometry/geodesic_test.py Outdated Show resolved Hide resolved
tests/geometry/geodesic_test.py Outdated Show resolved Hide resolved
tests/geometry/geodesic_test.py Show resolved Hide resolved
tests/geometry/geodesic_test.py Outdated Show resolved Hide resolved
@michalk8 michalk8 marked this pull request as ready for review December 27, 2023 12:02
@michalk8 michalk8 self-requested a review December 27, 2023 12:02
Copy link
Collaborator

@michalk8 michalk8 left a comment

Choose a reason for hiding this comment

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

Thanks @guillaumehu , merging this!

@michalk8 michalk8 merged commit a421e86 into ott-jax:main Dec 27, 2023
12 checks passed
@guillaumehu
Copy link
Collaborator Author

guillaumehu commented Dec 27, 2023

Perfect @michalk8 , thank you for reviewing the PR!

michalk8 pushed a commit that referenced this pull request Jun 27, 2024
* scale for the eigval

* eigval for comb. Lap.

* add test for heat kernel

* `t=eps/4.0`

* formatting

* atol rtol test `test_geometry_differentiability`

* formatting & test `order` and `t`
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