Structural Hamming distance between two partially oriented DAGs | R Documentation |
Structural Hamming distance between two partially oriented DAGs.
shd(est, true)
est |
The first (partially oriented) DAG. This could also be the estimated DAG. |
true |
The second (partially oriented) DAG. This could also be the equivalence class of the true DAG. |
The structural Hamming distance as proposed by Tsamardinos et al. (2006) is calculated and returned. The cases are listed below
True | Estimated | Penalty |
- | 1 | |
- | 1 | |
-> | 1 | |
<- | 1 | |
-> | - | 1 |
- | <- | 1 |
-> | <- | 1 |
A list including
mat |
A table with the agreements and disagreements between the two DAGs. |
shd |
The structural Hamming distance. |
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr
Tsamardinos, Brown and Aliferis (2006). The max-min hill-climbing Bayesian network structure learning algorithm. Machine learning, 65(1), 31-78.
pc.skel, pc.or, mmhc.skel, plotnetwork
y <- rdag(1000, 20, 0.2) tru <- y$G mod <- pc.skel(y$x) a <- pc.or(mod) shd( a$G, dag2eg(tru) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.