Repository navigation
docs: precision, recall and F1 partials, how-to section, bit-exact platform test (#1234) - #1558
Merged
Merged
Conversation
Three partials under partials/ops/metrics/ with math, intuition, examples and references; a 'Precision, recall and F1' section in the metrics how-to. The examples are tagged regions of ClassificationMetrics.kt, compiled and run by skainet-docs-samples. MetricsPlatformParityTest pins the exact Double bits of the metrics over 6,000 samples in commonTest, so every tested target must produce them (#1232, #1233). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 23, 2026
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1234. Supports #1232 and #1233.
What changes
docs/modules/ROOT/partials/ops/metrics/(precision,recall,f1score), each withmath,intuition,examplesandreferencestags. Themathblocks state the per-class definition, macro / micro / binary averaging, the class set used for macro (classes seen in targets or predictions) and the zero-division convention (0.0).how-to/metrics-and-perf-testing.adoc. It includes the partials by tag; the definitions sit in collapsible blocks.ClassificationMetrics.kt, compiled byskainet-docs-samplesand asserted inSamplesTest.MetricsPlatformParityTest(skainet-backend-cpucommonTest): 6,000 samples in three batches, exactDoublebits required for accuracy, precision, recall and F1 (macro and micro). The existing metric tests use a1e-6tolerance, so they could not show that targets agree bit for bit.Verification
precision_recall_fscore_support,accuracy_score): the four-sample example, the imbalanced example, and the 6,000-sample batch, where the bits are identical.sk.ainet.exec.metrics.*(5 suites, 49 tests, 0 failures) onjvmTest,linuxX64Test,jsBrowserTest,wasmJsBrowserTest,wasmWasiNodeTest.:skainet-docs-samples:jvmTest: 6 tests, 0 failures.stemblocks emitted. I checked the generated HTML, not the page in a browser.zero_division=0) were read on the pages.Not in this PR
TensorOpsfunctions, so the operator-doc generator does not pick these partials up; they are only shown on the how-to page.🤖 Generated with Claude Code