Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When calculating edge errors, there is a 1-to-1 mapping between computed graph nodes and GT graph nodes, see details below. It is faster to use a dictionary for doing the node mapping with O(n log(n)) runtime, compared to repeatedly iterating over a list with np.where (O(n^2)). Details: Potential 1-to-many matches, namely computed nodes that match multiple GT nodes (called non-split), are not part of the induced graph. Therefore, all edges incident to such nodes are also not part of the induced graph, leaving us with the desired 1-to-1 mapping for all nodes that are incident to existing edges in the induced graph, which we iterate over in the loop for finding FP edges. Conversely, each GT node is only matched to at most one computed node, directly yielding the 1-1 matching for finding FN edges.
- Loading branch information