ternaus / iglovikov_helper_functions

An unstructured set of helper functions
MIT License
59 stars 15 forks source link

Fix error in precision_recall calculation #104

Open rubencart opened 3 years ago

rubencart commented 3 years ago

Fixes https://github.com/ternaus/iglovikov_helper_functions/issues/103.

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.64%.

Quality metrics Before After Change
Complexity 6.93 ⭐ 8.34 ⭐ 1.41 👎
Method Length 111.57 🙂 111.14 🙂 -0.43 👍
Working memory 11.04 😞 10.69 😞 -0.35 👍
Quality 52.55% 🙂 51.91% 🙂 -0.64% 👎
Other metrics Before After Change
Lines 200 199 -1
Changed files Quality Before Quality After Quality Change
iglovikov_helper_functions/metrics/map.py 52.55% 🙂 51.91% 🙂 -0.64% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
iglovikov_helper_functions/metrics/map.py recall_precision 16 🙂 248 ⛔ 13 😞 35.30% 😞 Try splitting into smaller methods. Extract out complex expressions
iglovikov_helper_functions/metrics/map.py get_overlaps 0 ⭐ 160 😞 11 😞 60.00% 🙂 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!