stated_parent_evaluator
Evaluate selected stated parents against the proximal primitive parents of held-out SNOMED concepts.
For a held-out concept the reference is its proximal primitive parent set: the most specific primitive ancestors (within the allowed parent set) in the inferred hierarchy. Outcomes:
exact: the selected parents equal the reference set.partial: at least one reference parent selected; every other selected parent is an ancestor of a reference parent.too_general: every selected parent is a proper ancestor of a reference parent. The classifier places the concept too high but not in the wrong branch.wrong: at least one selected parent is not an ancestor-or-self of any reference parent, so the classifier can place the concept in the wrong branch.no_reference: the source has no primitive ancestor in the allowed set (e.g. a situation) or no OMOP concept_id.
classify_parents(predicted, expected, ancestry)
Classify a selected parent set against the reference proximal primitive parents.
Source code in src/ariadne/evaluation/stated_parent_evaluator.py
36 37 38 39 40 41 42 43 44 45 46 47 48 | |
evaluate_stated_parents(details, conn, schema, settings)
Compare build_stated_parents_map details with the held-out concepts' proximal primitive parents.
Returns:
| Type | Description |
|---|---|
DataFrame
|
One row per source with selected and reference parents and the outcome. |
Source code in src/ariadne/evaluation/stated_parent_evaluator.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |