BayesNet.hasSameStructure
- BayesNet.hasSameStructure(other)
- Parameters:
pyagrum.DAGmodel – a direct acyclic model
- Returns:
True if all the named node are the same and all the named arcs are the same
- Return type:
bool
Example
import pyagrum as gum
bn1 = gum.fastBN("A->B->C")
bn2 = gum.fastBN("A->B->C") # other parameters
bn1.hasSameStructure(bn2)
# True
bn1.hasSameStructure(gum.fastBN("A->B<-C"))
# False
Class