Skip to content

✨ feat: 重构评估指标并补充 precision/recall#20

Open
zrr-bot wants to merge 1 commit into
zrr1999:mainfrom
zrr-bot:fix/issue-5-metrics-refactor
Open

✨ feat: 重构评估指标并补充 precision/recall#20
zrr-bot wants to merge 1 commit into
zrr1999:mainfrom
zrr-bot:fix/issue-5-metrics-refactor

Conversation

@zrr-bot

@zrr-bot zrr-bot commented Mar 10, 2026

Copy link
Copy Markdown

摘要

  • 重构评估指标计算逻辑,抽离统一的类别指标与汇总结构,减少准确率、Precision、Recall、F1 的重复计算代码
  • 为训练评估结果补充 weighted precision、weighted recall,以及对应的类别级 precision/recall 输出
  • 新增针对指标计算与 Typst 导出的单元测试,覆盖本次重构后的核心行为

验证

  • uvx pre-commit run --files src/recognize/evaluate.py tests/test_evaluate.py
  • uv run --python 3.12 python -m unittest tests/test_evaluate.py
  • uv run --python 3.12 pyright src/recognize/evaluate.py tests/test_evaluate.py

说明

Fixes #5

@zrr-bot

zrr-bot commented Mar 12, 2026

Copy link
Copy Markdown
Author

Portfolio follow-up: review is currently blocked by the failing CodeStyle Check job, while Type Check is green. Please address the style/pre-commit issue first, then re-run CI so this PR can be re-triaged cleanly.

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