BayesNet.loadNET
- BayesNet.loadNET(name, l=None)
Load a NET file.
- Parameters:
name (
str) – the name’s filel (
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.saveNET("model.net")
bn2 = gum.BayesNet()
bn2.loadNET("model.net")
sorted(bn2.names())
# ['A', 'B', 'C']
bn2.hasSameStructure(bn)
# True
Class