Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@luisfpereira
Copy link
Collaborator

This PR fixes the dynamic programming algorithm. In particular, we ensure the end point of the aligned curve corresponds to the end point of the curve. I'm afraid we are not there yet, but hopefully this is a first step towards correctness.

Moreover, I've tried to improve naming in order to make the code more readable, but I'm afraid it is still too hard to follow.

Known issues (also occur in previous implementation)

The dynamic programming outputs a squared dist. After alignment, we can also compute a distance using the total space metric (this is the distance quotient metric outputs).

For more complex cases (thinking about birds), I've realized these distances are similar, but slightly off. Moreover, when we swap point and base_point, the dynamic programming squared dist is the same, but the distance we compute with the total space is not necessarily symmetric (though close).

For simpler cases as the curves generated by random_point, the results are better (correspondence between DP and total space; almost symmetric distance).

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.

Thank you so catching this! LGTM.

@alebrigant does this look good to you?

@luisfpereira
Copy link
Collaborator Author

I'm also merging this one, as it is a bug fix. @alebrigant, please let me know if there's something you disagree with, so that I can address it in a later PR.

@luisfpereira luisfpereira merged commit dc7ae1f into geomstats:main Apr 12, 2024
@luisfpereira luisfpereira deleted the dyn-prog branch April 12, 2024 09:49
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