You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sub-issue of #1222 (Precision, Recall and F1Score metrics).
Lane: 5 · Docs / DARC Skill needed: AsciiDoc and technical writing; enough ML background to explain precision vs. recall. No Kotlin beyond reading a 30-line class. Size: s (~2–3 h for all three) Blocked by: nothing for the math / intuition / references tags (start now); the examples tag needs #1229 so the example actually runs.
What to do
Write three partials, one per metric, following the tag structure of docs/modules/ROOT/partials/ops/tensorops/matmul.adoc:
docs/modules/ROOT/partials/ops/metrics/f1score.adoc
Each with non-placeholder // tag::math[], // tag::intuition[], // tag::examples[], // tag::references[] blocks. Use stem:[…] / [stem] (LaTeX; the playbook sets stem: latexmath) for the formulas. The math block must state the per-class
definition, what macro vs. micro averaging does, and the zero-division convention
adopted in [Lane 1 · numerics] Precision/Recall/F1 — averaging-mode and zero-division conventions #1224.
Metrics are not TensorOps functions, so the operator-doc generator will not pick
these partials up automatically. Surface them by adding a "Precision, recall and F1"
subsection to docs/modules/ROOT/pages/how-to/metrics-and-perf-testing.adoc that include::partial$ops/metrics/f1score.adoc[tag=intuition] (and the others by tag).
The examples block must be real code that compiles against develop after [Lane 2 · kotlin-core] F1Score metric #1229 —
ideally a tagged snippet in skainet-docs-samples included via include::example$…,
like the existing TrainingDemo.kt accuracy example on that page; a plain [source,kotlin] block is acceptable if you say why.
Build the site locally (see Contributing → Build from source / the docs.yml
workflow) and check the math renders.
Acceptance
Three partials, all four tags non-empty, math renders
Metrics how-to page shows the new section with the intuition text and a runnable example
Intuition to convey: precision answers "of what I predicted positive, how much was right";
recall answers "of what was actually positive, how much did I catch"; F1 is their harmonic
mean, so it punishes a classifier that is high on one only because the other is near zero —
which is exactly where raw accuracy stays silent (predict the majority class everywhere:
high accuracy, near-zero minority recall). Also spell out that macro F1 is the mean of
per-class F1s, not the F1 of the macro means.
Sub-issue of #1222 (Precision, Recall and F1Score metrics).
Lane: 5 · Docs / DARC
Skill needed: AsciiDoc and technical writing; enough ML background to explain precision vs. recall. No Kotlin beyond reading a 30-line class.
Size: s (~2–3 h for all three)
Blocked by: nothing for the
math/intuition/referencestags (start now); theexamplestag needs #1229 so the example actually runs.What to do
docs/modules/ROOT/partials/ops/tensorops/matmul.adoc:docs/modules/ROOT/partials/ops/metrics/precision.adocdocs/modules/ROOT/partials/ops/metrics/recall.adocdocs/modules/ROOT/partials/ops/metrics/f1score.adocEach with non-placeholder
// tag::math[],// tag::intuition[],// tag::examples[],// tag::references[]blocks. Usestem:[…]/[stem](LaTeX; the playbook setsstem: latexmath) for the formulas. Themathblock must state the per-classdefinition, what macro vs. micro averaging does, and the zero-division convention
adopted in [Lane 1 · numerics] Precision/Recall/F1 — averaging-mode and zero-division conventions #1224.
TensorOpsfunctions, so the operator-doc generator will not pickthese partials up automatically. Surface them by adding a "Precision, recall and F1"
subsection to
docs/modules/ROOT/pages/how-to/metrics-and-perf-testing.adocthatinclude::partial$ops/metrics/f1score.adoc[tag=intuition](and the others by tag).examplesblock must be real code that compiles againstdevelopafter [Lane 2 · kotlin-core] F1Score metric #1229 —ideally a tagged snippet in
skainet-docs-samplesincluded viainclude::example$…,like the existing
TrainingDemo.ktaccuracy example on that page; a plain[source,kotlin]block is acceptable if you say why.docs.ymlworkflow) and check the math renders.
Acceptance
[Lane 6 · review] Precision/Recall/F1 — DARC review and @DarcValidated #1235 will click each one)
Notes
Intuition to convey: precision answers "of what I predicted positive, how much was right";
recall answers "of what was actually positive, how much did I catch"; F1 is their harmonic
mean, so it punishes a classifier that is high on one only because the other is near zero —
which is exactly where raw accuracy stays silent (predict the majority class everywhere:
high accuracy, near-zero minority recall). Also spell out that macro F1 is the mean of
per-class F1s, not the F1 of the macro means.
References to start from: sklearn
precision_recall_fscore_support, torchmetricsF1Score, and https://en.wikipedia.org/wiki/F-score .