scoring¶
knowledge_graph.clinical.scoring
Scores of the clinical systems: exact-span NER, pooled relations, and the shared P/R/F1 counts.
metric(gold, predicted)
¶
tp/fp/fn and P/R/F1: common.precision_recall_f1 without the set sizes.
Source code in src/knowledge_graph/clinical/scoring.py
6 7 8 | |
score_ner(documents, predictions)
¶
Micro exact character-span NER against all reference mentions.
Source code in src/knowledge_graph/clinical/scoring.py
11 12 13 14 15 | |
reachable_relations(annotation, available_entities)
¶
Reference relations whose endpoints coexist in at least one model input.
Source code in src/knowledge_graph/clinical/scoring.py
18 19 20 21 | |
score_relations(documents)
¶
Relation P/R/F1 pooled over notes.
Source code in src/knowledge_graph/clinical/scoring.py
24 25 26 27 28 | |