[Lane 1 · numerics] Precision/Recall/F1 — averaging-mode and zero-division conventions
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- Une demi-journée
- Accessibilité débutants
- 68/100
- Type d'issue
- Documentation
- Clarté
- Clairement spécifiée
- Activité
- Calme
- Stack technique
- python, pytorch, scikit-learn
- Domaine
- ai, machine-learning
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Kotlin
- Étoiles
- 52
- Forks
- 15
- Merge moyen
- 23 h 32 min
- PR mergées (30 j)
- 81
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de SKaiNET-developers/SKaiNET
-
coding size:s skill:kotlin-core sub-issue
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
SKaiNET-developers/SKaiNET#1421 ·
Les mainteneurs répondent en général sous 1 jour
-
coding size:s skill:kotlin-core sub-issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
SKaiNET-developers/SKaiNET#1419 ·
Les mainteneurs répondent en général sous 1 jour
-
[Lane 2 · kotlin-core] NotImplemented stubs — Markdown output for the operator docs generatorOuvertecoding good first issue size:s skill:kotlin-core sub-issue
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
SKaiNET-developers/SKaiNET#1418 ·
Les mainteneurs répondent en général sous 1 jour
-
[Lane 2 · kotlin-core] NotImplemented stubs — remove or implement TensorDefineDslImpl.create()Ouvertecoding good first issue size:xs skill:kotlin-core sub-issue
Difficulté 2/5 Moins d'une heure Accessibilité débutants 82/100
SKaiNET-developers/SKaiNET#1417 ·
Les mainteneurs répondent en général sous 1 jour
-
coding good first issue size:s skill:kotlin-core sub-issue
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
SKaiNET-developers/SKaiNET#1416 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de SKaiNET-developers/SKaiNET
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
intellij-elixir/intellij-elixir#4585 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
music-assistant/mobile-app#1298 ·
Les mainteneurs répondent en général sous 1 jour
-
Docs: drivine4j doesn't read the flat DATABASE_* variables, as 02-connecting.md and design.md sayOuvertedocumentation
Difficulté 1/5 1-3 heures Accessibilité débutants 78/100
liberation-data/drivine-python#361 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100