BayesNet.loadXDSL
- BayesNet.loadXDSL(name, l=None)
Load a XDSL file.
- Parameters:
name (
str) – the file’s namel (
list[Callable[[int],Any]]) – functions called during the loading with its progress (a percentage)
- Raises:
pyagrum.GumIOError – If file not found
pyagrum.FatalError – If file is not valid
- Return type:
str
Example
import pyagrum as gum
bn = gum.fastBN("A->B->C")
bn.saveXDSL("model.xdsl")
bn2 = gum.BayesNet()
bn2.loadXDSL("model.xdsl")
sorted(bn2.names())
# ['A', 'B', 'C']
bn2.hasSameStructure(bn)
# True
Class