powered by
Compute the Hamming Distance between two graphs.
hd(cg1, cg2, normalized = FALSE)
An integer representing the Hamming Distance between the two graphs, if normalized = FALSE, or a numeric between 0 and 1 if normalized = TRUE.
normalized = FALSE
normalized = TRUE
A caugi object.
caugi
Logical; if TRUE, returns the normalized Hamming Distance.
TRUE
Other metrics: aid(), shd()
aid()
shd()
cg1 <- caugi(A %-->% B %-->% C, D %-->% C, class = "DAG") cg2 <- caugi(A %-->% B %-->% C, D %---% C, class = "PDAG") hd(cg1, cg2) # 0
Run the code above in your browser using DataLab