Repository navigation
docs: correct the mean_score docstring and the [Plain, NoteSM] table row (#249, #338) #403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
07af8aa
3aa363c
12135c6
b79f0e8
18c241d
8fe2c03
a8e42a8
e9bf36d
f498854
633ce69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- `_accumulate_field_metrics`: list-of-StructuredModel element fields arrive under `fields`, not `nested_fields`; compare_with no longer emits `nested_fields` (its emitter went in ad19ac8). Note that only a finite score is summed. - bulk-evaluation.md and understanding-results.md said compare_with "only emits the score at the list parent". An object node inside a list element is scored too (`items.addr` gets a mean_score); only the leaves are not. - CHANGELOG: move the #338 correction from `### Fixed` with a `**Documentation:**` prefix to a `### Documentation` section, the heading earlier releases use. Refs #249, #338
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,7 +139,7 @@ Because each document's `overall_score = Σ_f(score × weight) / Σ_f(weight)` a | |
|
|
||
| The denominator is the count of documents whose `overall_score` was a finite number: error docs (`update()` raised) and successful docs carrying a non-finite or missing `overall_score` are both excluded. With zero eligible documents the score is `0.0` — disambiguate via `document_count` when that matters. | ||
|
|
||
| Per-field `mean_score` is reported at every nested path (leaf and object/list aggregate) where `threshold_applied_score` was observed in at least one document, averaging over just those documents. Paths with confusion-matrix counts but no score data (e.g., leaves inside `List[StructuredModel]`, where `compare_with()` only emits the score at the list parent) are surfaced without a `mean_score` key rather than reported as `0.0`. | ||
| Per-field `mean_score` is reported at every nested path (leaf and object/list aggregate) where `threshold_applied_score` was observed in at least one document, averaging over just those documents. Paths with confusion-matrix counts but no score data (e.g., leaves inside `List[StructuredModel]`, which `compare_with()` emits without a score) are surfaced without a `mean_score` key rather than reported as `0.0`. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Low (recall). The example "leaves inside
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, thanks. Confirmed on 12135c6: with a below-threshold element pair, no |
||
|
|
||
| --- | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -456,12 +456,13 @@ def _accumulate_field_metrics( | |
| ) -> None: | ||
| """Recursively accumulate field-level CM counts and threshold_applied_score. | ||
|
|
||
| Walks both ``fields`` (object subtrees) and ``nested_fields`` | ||
| (list-of-StructuredModel) so CM counts are recorded at every node | ||
| compare_with emits. Score sums (for ``mean_score``) are recorded | ||
| only where a node carries ``threshold_applied_score``. Leaves under | ||
| a list parent carry CM counts only, so their paths get no | ||
| ``mean_score`` (see #249). | ||
| Walks ``fields``, which holds both object subtrees and the element | ||
| fields of a list of StructuredModel, so CM counts are recorded at | ||
| every node compare_with emits. Score sums (for ``mean_score``) are | ||
| recorded only where a node carries a finite | ||
| ``threshold_applied_score``. Leaves under a list parent carry CM | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Low (recall). "Leaves under a list parent carry CM counts only" does not match the measured output. With
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. I reproduced your model: |
||
| counts only, so their paths get no ``mean_score`` (see #249). | ||
| ``nested_fields`` is also walked, but compare_with no longer emits it. | ||
| """ | ||
| for field_name, field_data in fields_dict.items(): | ||
| if not isinstance(field_data, dict): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Low, optional.
RELEASING.md("What belongs in the changelog") says entries are for changes a user can observe, and "When in doubt, ask whether a user reading the release notes could act on it." This entry corrects a table in the 1.0.0 notes, which is defensible. But the user-facing correction in this PR, themean_scoresentence inbulk-evaluation.mdandunderstanding-results.md(leaves under a list get no score, object nodes inside an element do), has no entry. If one of the two gets an entry, the guide-page correction is the one a user can act on.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, the guide fix is the one a user can act on. I added an Unreleased Documentation entry for it (#249) and kept the #338 table correction next to it. Fixed in 18c241d.