Skip to content

Conversation

@YijieZhu15
Copy link
Collaborator

Add examples to utils/metrics.py.

@shaneahmed shaneahmed marked this pull request as draft April 4, 2025 10:01
@shaneahmed shaneahmed changed the title add examples to utils/metrics.py 📝 Add Examples to utils/metrics.py Apr 4, 2025
@codecov
Copy link

codecov bot commented Apr 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.70%. Comparing base (bae6c2e) to head (aba1330).
⚠️ Report is 18 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #921      +/-   ##
===========================================
- Coverage    99.70%   99.70%   -0.01%     
===========================================
  Files           71       71              
  Lines         8848     8847       -1     
  Branches      1154     1154              
===========================================
- Hits          8822     8821       -1     
  Misses          23       23              
  Partials         3        3              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shaneahmed shaneahmed added this to the Release v1.7.0 milestone Apr 25, 2025
@shaneahmed shaneahmed added the documentation Improvements or additions to documentation label Apr 25, 2025
@YijieZhu15 YijieZhu15 marked this pull request as ready for review May 1, 2025 13:18
- Remove redundant line breaks
@shaneahmed shaneahmed merged commit ad66b2d into develop May 1, 2025
15 checks passed
@shaneahmed shaneahmed deleted the create_examples branch May 1, 2025 14:51
@Jiaqi-Lv Jiaqi-Lv requested a review from Copilot May 9, 2025 11:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds example usage code to the docstrings of the functions in utils/metrics.py to better illustrate how to use them.

  • Added examples for pair_coordinates
  • Added examples for f1_detection
  • Added examples for dice

Indices of unpaired points in set B.
Examples:
Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider including comments on expected output for the pair_coordinates examples to help users validate the function's behavior.

Copilot uses AI. Check for mistakes.
"""Calculate the F1-score for predicted set of coordinates."""
"""Calculate the F1-score for predicted set of coordinates.
Examples:
Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a brief note on the expected f1_score value or output format for the f1_detection examples for clarity.

Copilot uses AI. Check for mistakes.
:class:`float`:
An estimate of Sørensen-Dice coefficient value.
Examples:
Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider including expected output details in the dice examples to assist users in verifying the Sørensen-Dice coefficient results.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants