BayesNet.loadXDSL

BayesNet.loadXDSL(name, l=None)

Load a XDSL file.

Parameters:
  • name (str) – the file’s name

  • l (list[Callable[[int], Any]]) – functions called during the loading with its progress (a percentage)

Raises:
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

BayesNet