[Lane 1 · numerics] Precision/Recall/F1 — averaging-mode and zero-division conventions
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 68/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- python, pytorch, scikit-learn
- 领域
- ai, machine-learning
调研方向
This is research only: no Kotlin or SKaiNET code. Read sklearn.metrics.precision_recall_fscore_support (docs and source) and torchmetrics.classification Precision, Recall, and F1Score. Build the edge-case table (empty batch, unseen class, one-sided class, all wrong, argmax ties) for macro and micro, then write three short recommendations (zero-division, macro class set, binary/threshold). Confirm the given fixture with a real sklearn call and post table plus recommendations as a comment on issue #1222; done when a maintainer replies adopted or amended.
由索引模型根据 Issue 内容生成。
描述
Sub-issue of #1222 (Precision, Recall and F1Score metrics).
Lane: 1 · Numerics / Research
Skill needed: comfortable reading scikit-learn / torchmetrics source and docs. No Kotlin required, no SKaiNET knowledge required.
Size: s (~2–4 h)
Blocked by: nothing — this is the first task in the feature and unblocks #1226.
What to do
- Read
sklearn.metrics.precision_recall_fscore_support(docs + source) and
torchmetrics.classification.{Precision, Recall, F1Score}(docs + source). - Produce a short table — one row per edge case, one column per library — for:
- empty batch (no samples at all);
- a class that appears in neither predictions nor targets (TP+FP+FN = 0);
- a class that appears only in targets (never predicted) and vice versa;
- all predictions wrong;
- ties in the argmax (two logits exactly equal).
For each: what does the library return for precision / recall / F1 undermacroand
micro, and do the two libraries agree?
- Answer the three decisions the parent issue leaves open, each as a one-paragraph
recommendation with a link a reviewer can click:- Zero-division:
0.0(sklearn default) vs.NaNvs. a parameter. The parent
recommends0.0to matchAccuracy.compute()on an empty accumulator. - Class set for macro averaging: union of classes seen in targets ∪ predictions
(sklearn) vs. the full class dimensionpredictions.shape[dim](which counts
never-seen classes as F1 = 0). These differ on small batches. - Binary mode: does binary mean "report the positive class (index 1) only", and
shouldF1Scoretake athreshold: Float?likeAccuracydoes, or is binary purely
averaging = BINARY?
- Zero-division:
- Post the table and the three recommendations as a comment on #1222 under
its Research section. That comment is the deliverable — not code.
Acceptance
- Edge-case table posted on #1222 with links to the exact sklearn / torchmetrics
doc sections or source lines - Three explicit recommendations (zero-division, macro class set, binary/threshold)
- A maintainer has replied "adopted" (or amended) so #1226 can start from a fixed contract
Notes
The hand-computed reference fixture the Kotlin sub-issues will test against is:
predicted classes [2, 0, 1, 2], targets [2, 1, 1, 0] (3 classes). Expected under
sklearn: per-class precision [0, 1, 0.5], recall [0, 0.5, 1], F1 [0, 0.667, 0.667];
macro P = R = 0.5, macro F1 = 0.444; micro P = R = F1 = 0.5 (= accuracy). Please confirm
those numbers by actually running precision_recall_fscore_support once and paste the
output — that turns a hand calculation into a citable reference.
- 主要语言
- Kotlin
- 星标
- 52
- 派生
- 15
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 37
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SKaiNET-developers/SKaiNET 的其他 Issue
-
coding good first issue platform size:xs skill:js sub-issue
难度 2/5 1-3 小时 新手友好度 72/100
SKaiNET-developers/SKaiNET#1232 ·
维护者通常 1 天内回复
-
compute-backend dsl/api enhancement size:m skill:kotlin-core skill:numerics
难度 5/5 一周以上 新手友好度 18/100
SKaiNET-developers/SKaiNET#1343 ·
维护者通常 1 天内回复
-
skeep tracking
难度 5/5 一周以上 新手友好度 15/100
SKaiNET-developers/SKaiNET#1331 · 1 条评论 ·
维护者通常 1 天内回复
-
assessment size:s skill:review sub-issue
难度 4/5 1-2 天 新手友好度 18/100
SKaiNET-developers/SKaiNET#1330 ·
维护者通常 1 天内回复
-
documentation good first issue size:s skill:docs sub-issue
难度 3/5 1-2 天 新手友好度 78/100
SKaiNET-developers/SKaiNET#1329 ·
维护者通常 1 天内回复
查看 SKaiNET-developers/SKaiNET 的全部 Issue
相似的 Issue
-
Dev
难度 2/5 1-3 小时 新手友好度 62/100
ankidroid/Anki-Android#22555 ·
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
-
core: RAC_LLM_OPTIONS_DEFAULT.min_p disagrees with the IDL's annotated default可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug core p3
难度 2/5 1-3 小时 新手友好度 70/100
RunanywhereAI/runanywhere-sdks#1083 ·
维护者通常 5 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
area: detector eco: java help wanted lane: free-agent roadmap size: S type: parser
难度 2/5 1-3 小时 新手友好度 62/100
arminazimi/evergreen#355 ·
维护者通常 1 天内回复