sfaira.versions.metadata.OntologyList.prepare_maps_to_leaves¶
- OntologyList.prepare_maps_to_leaves(include_self: bool = True) Dict[str, numpy.ndarray] ¶
Precomputes all maps of nodes to their leave nodes.
Note that for a list ontology, this maps each node to itself.
- Parameters
include_self – whether to include node itself
- Returns
Dictionary of index vectors of leave node matches for each node (key).