Computes G1 score from two caugi::caugi objects.
It converts the caugi::caugi objects to adjacency matrices and computes
G1 score defined as \(2 \cdot TN/(2 \cdot TN + FN + FP)\), where TN are truth negatives,
FP are false positives, and FN are false negatives. If TN + FN + FP = 0, 1 is returned.
Only supports caugi::caugi objects with these edge types present -->, <-->, --- and no edge.
Usage
g1_score(truth, est, type = c("adj", "dir"))Arguments
- truth
A caugi::caugi object representing the truth graph.
- est
A caugi::caugi object representing the estimated graph.
- type
Character string specifying the comparison type:
"adj": adjacency comparison."dir": orientation comparison conditional on shared adjacencies.
References
Petersen, Anne Helby, et al. "Causal discovery for observational sciences using supervised machine learning." arXiv preprint arXiv:2202.12813 (2022).
See also
Other metrics:
confusion(),
evaluate(),
f1_score(),
false_omission_rate(),
fdr(),
npv(),
precision(),
recall(),
reexports,
specificity()
