Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Lane 1 · numerics] Precision/Recall/F1 — averaging-mode and zero-division conventions

Aperta
#1,224 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
68/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
python, pytorch, scikit-learn

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

good first issue research size:s skill:numerics sub-issue training

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

  1. Read sklearn.metrics.precision_recall_fscore_support (docs + source) and
    torchmetrics.classification.{Precision, Recall, F1Score} (docs + source).
  2. 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 under macro and
      micro, and do the two libraries agree?
  3. 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. NaN vs. a parameter. The parent
      recommends 0.0 to match Accuracy.compute() on an empty accumulator.
    • Class set for macro averaging: union of classes seen in targets ∪ predictions
      (sklearn) vs. the full class dimension predictions.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
      should F1Score take a threshold: Float? like Accuracy does, or is binary purely
      averaging = BINARY?
  4. 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.

Lingua principale
Kotlin
Stelle
52
Fork
15
Merge medio
1g 15h
PR unite (30g)
36

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SKaiNET-developers/SKaiNET

Tutte le issue di SKaiNET-developers/SKaiNET

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.