Structural Hamming distance between two partially oriented DAGs {MXM} | R Documentation |
Structural Hamming distance between two partially oriented DAGs
Description
Structural Hamming distance between two partially oriented DAGs.
Usage
shd(est, true)
Arguments
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. |
Details
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 |
Value
A list including
mat |
A table with the agreements and disagreements between the two DAGs. |
shd |
The structural Hamming distance. |
Author(s)
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr
References
Tsamardinos, Brown and Aliferis (2006). The max-min hill-climbing Bayesian network structure learning algorithm. Machine learning, 65(1), 31-78.
See Also
pc.skel, pc.or, mmhc.skel, plotnetwork
Examples
y <- rdag(1000, 20, 0.2)
tru <- y$G
mod <- pc.skel(y$x)
a <- pc.or(mod)
shd( a$G, dag2eg(tru) )