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: correct plot scaling calculation and leaf parameters #821

Merged
merged 9 commits into from
Nov 7, 2024

Conversation

qh681248
Copy link
Contributor

PR Type

  • Bugfix
  • Feature

Description

The algorithm's execution was slow, not because of image size but due to the leafsize being too close to the coreset_size and there was a bug when we set downsampling factor = 8 which has been fixed here:

  • Increase leafsize was from 10,000 to either 16,000, which speeds up the algorithm, even when downsampling = 1.
  • Fix scale calculation to use downsampling factor squared
  • Update leaf count to 16,000

How Has This Been Tested?

Test A: (Write your answer here.)
Test B: (Write your answer here.)
Test C: (Write your answer here.)

Does this PR introduce a breaking change?

No

Screenshots

(Write your answer here.)

Checklist before requesting a review

  • I have made sure that my PR is not a duplicate.
  • My code follows the style guidelines of this project.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have performed a self-review of my code.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

- Fix scale calculation to use downsampling factor squared
- Update leaf count to 16,000
@qh681248 qh681248 linked an issue Oct 23, 2024 that may be closed by this pull request
Copy link
Contributor

Performance review

Commit 7119d65 - Merge a4cbc80 into bc5acf0

No significant changes to performance.

Copy link
Contributor

Performance review

Commit eded51e - Merge 07dbc36 into bc5acf0

No significant changes to performance.

@gw265981
Copy link
Contributor

From my local testing, I get RecursionError before the fix and it runs after the fix (takes around 200s).

Copy link
Contributor

@rg936672 rg936672 left a comment

Choose a reason for hiding this comment

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

Looks good! A couple of questions - if you think these would be better addressed outside this PR I'm happy to approve as is, though.

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Performance review

Commit 1222f37 - Merge ff209dd into 98919bb

No significant changes to performance.

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Performance review

Commit f9b259b - Merge 1f70b12 into 98919bb

No significant changes to performance.

Copy link
Contributor

@rg936672 rg936672 left a comment

Choose a reason for hiding this comment

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

This all looks good; the new scaling is much more visually apparent. As a last change, we should add this fix to CHANGELOG (and you'll want to merge in main first in order to avoid merge conflicts).

While you're making changes, it might also be good to note in the example (in a comment or docstring) that the point scaling is deliberately exaggerated for visual clarity.

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Performance review

Commit c2152ec - Merge eff58e7 into 98919bb

No significant changes to performance.

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Performance review

Commit f674fbd - Merge ea2cc84 into 98919bb

No significant changes to performance.

Copy link
Contributor

@rg936672 rg936672 left a comment

Choose a reason for hiding this comment

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

Sorry to nitpick the changelog entries so much, but I think it's good for us to develop good habits around these! Happy for pushback if you feel I've mischaracterised your changes, though.

Copy link
Contributor

github-actions bot commented Nov 6, 2024

Performance review

Commit b588f49 - Merge b0c7ab1 into 98919bb

No significant changes to performance.

rg936672
rg936672 previously approved these changes Nov 6, 2024
Copy link
Contributor

@rg936672 rg936672 left a comment

Choose a reason for hiding this comment

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

Nice, all looks good :)

Copy link
Contributor

github-actions bot commented Nov 6, 2024

Performance review

Commit 193cf64 - Merge bf68a30 into 98919bb

No significant changes to performance.

Copy link
Contributor

github-actions bot commented Nov 6, 2024

Performance review

Commit 641ad93 - Merge 4463e60 into a227120

No significant changes to performance.

@rg936672 rg936672 merged commit 272a30c into main Nov 7, 2024
19 checks passed
@rg936672 rg936672 deleted the bugfix/David-MarkerSize-Bug branch November 7, 2024 09:34
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.

Trackdown markersize bug on David example when downsampling = 1.
3 participants