BayesNet.loadNET

BayesNet.loadNET(name, l=None)

Load a NET file.

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

  • 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.saveNET("model.net")
bn2 = gum.BayesNet()
bn2.loadNET("model.net")
sorted(bn2.names())
# ['A', 'B', 'C']
bn2.hasSameStructure(bn)
# True

Class

BayesNet