dataeval.core.LabelReconciliationResult

class dataeval.core.LabelReconciliationResult

Result of reconciling class labels against an ontology.

matched

Class name to the single concept id it resolved to.

Type:

Mapping[str, str]

unmatched

Class names that resolved to no concept.

Type:

Sequence[str]

ambiguous

Class names that resolved to more than one candidate concept id.

Type:

Mapping[str, Sequence[str]]

ancestor_paths

For each matched class name, its ancestor concept ids nearest-first (the is-a path toward the root, possibly ending at an external id).

Type:

Mapping[str, Sequence[str]]

external_ancestors

For each matched class name whose is-a path is truncated, the subset of its ancestor ids that are not defined in the ontology (external references). Present (non-empty) only for incomplete/subset ontologies; signals that the hierarchy above that label is unresolved rather than rooted.

Type:

Mapping[str, Sequence[str]]

induced_edges

(parent_name, child_name) is-a edges of the sub-hierarchy induced by the matched classes — the transitive reduction restricted to those classes (intermediate concepts collapsed).

Type:

Sequence[tuple[str, str]]

relations

For each ordered pair of distinct matched class names (a, b), the relation of a to b: "ancestor" (a is a superclass of b), "descendant" (a is a subclass of b), "sibling" (shared ancestor but neither subsumes the other), or "unrelated".

Type:

Mapping[tuple[str, str], str]