Skip to content

Commit

Permalink
Fix: GC efficiency calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
klieret committed Aug 7, 2023
1 parent cad7366 commit 95dbc10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gnn_tracking/metrics/graph_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_efficiency_purity_edges(data: Data, pt_thld=0.9) -> dict[str, float]:
hit_mask[data.true_edge_index[0]] & hit_mask[data.true_edge_index[1]]
)
# Factor of 2 because the true edges are undirected
efficiency = data.y[edge_mask].sum() / 2 * true_edge_mask.sum()
efficiency = data.y[edge_mask].sum() / (2 * true_edge_mask.sum())
purity = data.y[edge_mask].sum() / edge_mask.sum()
return {
"efficiency": efficiency.item(),
Expand Down

0 comments on commit 95dbc10

Please sign in to comment.