[Lane 2 · kotlin-core] Recall metric
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- kotlin
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
First check the dependency on #1226, then read Accuracy.kt and ConfusionMatrixAccumulator. Implement Recall and its factory functions in Recall.kt, and add the listed cases in RecallTest.kt, following AccuracyTest.kt for tensor helpers. Run the specified API dump and JVM tests; done means the public API is included and all six cases pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Sub-issue of #1222 (Precision, Recall and F1Score metrics).
Lane: 2 · Kotlin core
Skill needed: Kotlin. Read Accuracy.kt and ConfusionMatrixAccumulator first — this task is mostly wiring.
Size: s (~2–3 h)
Blocked by: #1226 (accumulator + Averaging)
What to do
- Add
public class Recall(averaging: Averaging = Averaging.MACRO, dim: Int = -1, threshold: Float? = null) : Metric
inskainet-lang/skainet-lang-core/src/commonMain/kotlin/sk/ainet/lang/nn/metrics/Recall.kt:override val name = "recall";update(...)delegates to a privateConfusionMatrixAccumulator(dim, threshold);compute()=reduce(acc.counts(), averaging) { tp, fp, fn -> if (tp + fn == 0L) 0.0 else tp.toDouble() / (tp + fn) };reset()delegates.
MirrorAccuracy.kt's KDoc style (what the metric means, thedim/thresholdsemantics, whataveragingdoes).
- Add factory functions at the bottom of the file mirroring
accuracy()/binaryAccuracy():
public fun recall(averaging: Averaging = Averaging.MACRO, dim: Int = -1): Metricand
public fun binaryRecall(threshold: Float = 0.5f): Metric. - Tests in
skainet-backends/skainet-backend-cpu/src/commonTest/kotlin/sk/ainet/exec/metrics/RecallTest.kt,
copyingAccuracyTest.kt's tensor helpers. Cover, with hand-computed expected values
(see the parent issue and #1224 for the reference fixturepred [2,0,1,2],target [2,1,1,0]):- macro multi-class with
Int32index targets → 0.5; - micro multi-class → 0.5 (and assert it equals
Accuracyon the same batch); - the same batch with soft (
FP32one-hot) targets gives the same result; - binary with
threshold, 2-class logits; - accumulation across two
update()calls equals one call on the concatenated batch; - zero-division: a class with TP+FP+FN = 0 contributes
0.0(per #1224), and
compute()on a fresh metric returns0.0.
- macro multi-class with
./gradlew :skainet-lang:skainet-lang-core:apiDumpand
./gradlew :skainet-backends:skainet-backend-cpu:jvmTest --tests "sk.ainet.exec.metrics.*".
Acceptance
-
Recall+recall()+binaryRecall()public and in the API dump - All six test cases above pass on JVM
- No duplicated argmax / iteration logic — everything goes through the accumulator
- PR links this issue and #1222; PR body states "unit tests only; ground-truth wiring tracked in SKEEP-005 (#1223)"
Notes
Recall answers "of what was actually positive, how much did I catch". The twin task #1227 (Precision) is the same shape with tp / (tp + fp) — filed separately so two people can each ship one.
- Ngôn ngữ chính
- Kotlin
- Star
- 52
- Fork
- 15
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 36
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SKaiNET-developers/SKaiNET
-
coding good first issue size:xs skill:kotlin-core sub-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
SKaiNET-developers/SKaiNET#1323 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
coding good first issue platform size:xs skill:js sub-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SKaiNET-developers/SKaiNET#1232 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
skeep tracking
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
SKaiNET-developers/SKaiNET#1331 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
assessment size:s skill:review sub-issue
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 18/100
SKaiNET-developers/SKaiNET#1330 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue size:s skill:docs sub-issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
SKaiNET-developers/SKaiNET#1329 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SKaiNET-developers/SKaiNET
Issue tương tự
-
bugbane/qf good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
osservatorionessuno/bugbane#173 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Bayern feature:Application ready web
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
digitalfabrik/entitlementcard#3176 ·
Maintainer thường phản hồi trong vòng 7 ngày
-
bug need-device
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
ramesh130/superplayer#495 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Remove song from playlistĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
maxrave-dev/SimpMusic#2649 ·
Maintainer thường phản hồi trong vòng 2 ngày