Skip to content

Deduplicate quality_funcs f1/acc against metrics.py - #615

Merged
Demirrr merged 1 commit into
developfrom
worktree-fix-quality-funcs-dup
Aug 10, 2026
Merged

Demirrr merged 1 commit into
developfrom
worktree-fix-quality-funcs-dup

Conversation

@Demirrr

@Demirrr Demirrr commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

  • quality_funcs.f1/acc reimplemented the tp/tn/fp/fn and precision/recall
    arithmetic already implemented by metrics.py's F1/Accuracy classes.
    Both now delegate to those classes instead of duplicating the math.
  • Prunes the corresponding item from Improvements.md (§2 Code duplication).
  • Adds a CHANGELOG.md entry.

Test plan

  • pytest tests/test_metrics.py passes
  • ruff check ontolearn/learners --exclude ontolearn/learners/spell_kit --line-length=200 passes
  • Manual sanity check: f1/acc produce identical results to the prior implementation on a hand-computed tp/tn/fp/fn case, including the zero-division edge case

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xuv1tiWYdtxTf2jhrSPWVa

quality_funcs.py reimplemented the tp/tn/fp/fn and precision/recall
arithmetic already implemented by metrics.py's F1/Accuracy classes.
f1() and acc() now delegate to those classes instead of duplicating
the math. Prunes the corresponding Improvements.md item and logs the
change in CHANGELOG.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xuv1tiWYdtxTf2jhrSPWVa
@Demirrr
Demirrr merged commit 802d86a into develop Aug 10, 2026
2 checks passed
@Demirrr
Demirrr deleted the worktree-fix-quality-funcs-dup branch August 10, 2026 09:42
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.

1 participant