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

Proposal to deal with explicit infinite edges #53

Merged
merged 8 commits into from
Feb 6, 2022

Conversation

ulupo
Copy link
Collaborator

@ulupo ulupo commented Nov 21, 2021

Just a way to start the discussion on whether and how to address #37. I believe this proposal has at least the correct logic, so could serve as an initial reference.

@@ -1564,11 +1587,9 @@ class ripser
std::greater<>());
#endif
for (size_t i = 0; i < idx_essential; ++i) {
if (!std::isinf(essential_pair[i])) {
Copy link
Collaborator Author

@ulupo ulupo Nov 21, 2021

Choose a reason for hiding this comment

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

This is about ensuring that births are not infinite ("the bar is never born"), but in this proposal it is not needed because is_born makes sure we don't end up in this case.

gph/src/ripser.h Outdated Show resolved Hide resolved
@ulupo
Copy link
Collaborator Author

ulupo commented Nov 21, 2021

One concern about this PR or similar approaches is that the additional control flow might introduce performance regressions, so I would suggest running extensive profiling before merging if we decide to address #37 at all.

gph/src/ripser.h Outdated Show resolved Hide resolved
gph/src/ripser.h Outdated Show resolved Hide resolved
@MonkeyBreaker
Copy link
Collaborator

One concern about this PR or similar approaches is that the additional control flow might introduce performance regressions, so I would suggest running extensive profiling before merging if we decide to address #37 at all.

My intuition after looking at the changes is that the overhead will be not be noticed. A benchmark will confirm this, but I am pretty sure we won't notice a slowdown.

@ulupo
Copy link
Collaborator Author

ulupo commented Nov 21, 2021

A benchmark will confirm this, but I am pretty sure we won't notice a slowdown.

Great!

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ulupo
❌ MonkeyBreaker
You have signed the CLA already but the status is still pending? Let us recheck it.

@MonkeyBreaker
Copy link
Collaborator

@ulupo after resolving merging conflicts with latest master I just performed a benchmark:

dataset dim thresh before timing [s] after timing [s]
sphere 2 - 0.55 0.56
dragon 1 - 1.66 1.70
random 7 - 3.53 3.5
fractal 2 - 4.24 4.2
o3_1024 3 1.8 1.97 1.97
o3_4096 3 1.4 37.5 37.4
torus 2 0.15 41.4 41.6

It seems that the runtime impact is not relevant. All the benchmark were done with n_threads=1.

Signed-off-by: julian <julian.burellaperez@heig-vd.ch>
@ulupo
Copy link
Collaborator Author

ulupo commented Jan 7, 2022

@MonkeyBreaker fantastic about the runtimes!

Signed-off-by: julian <monkeybreaker@protonmail.com>
Much easier to write :)

Signed-off-by: julian <monkeybreaker@protonmail.com>
Signed-off-by: julian <monkeybreaker@protonmail.com>
@MonkeyBreaker MonkeyBreaker marked this pull request as ready for review February 6, 2022 14:09
@MonkeyBreaker MonkeyBreaker linked an issue Feb 6, 2022 that may be closed by this pull request
Signed-off-by: julian <monkeybreaker@protonmail.com>
@MonkeyBreaker
Copy link
Collaborator

@ulupo thank you for this PR and exploring cases where we had some issues !
I added some minor changes, hope they are good for you.

I will proceed with the Merge of this PR, thank you again for your great work :)

@MonkeyBreaker MonkeyBreaker added this to In progress in v0.3.0 via automation Feb 6, 2022
@MonkeyBreaker MonkeyBreaker merged commit ae4cf3b into giotto-ai:main Feb 6, 2022
v0.3.0 automation moved this from In progress to Done Feb 6, 2022
@MonkeyBreaker MonkeyBreaker deleted the explicit_inf branch February 6, 2022 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Always treat bars with infinite death as essential bars
3 participants