lib.notebook.getJunctionTree
- pyagrum.lib.notebook.getJunctionTree(bn, withNames=True, size=None)
get a HTML string for a junction tree (more specifically a join tree)
- Parameters:
bn (
pyagrum.BayesNet) – the Bayesian networkwithNames (
Boolean) – display the variable names or the node id in the cliquesize (
str) – size (for graphviz) of the rendered graph
- Return type:
str- Returns:
- str
the HTML representation of the graph
Example
import pyagrum as gum
import pyagrum.lib.notebook as gnb
bn = gum.fastBN("A->B->C")
html = gnb.getJunctionTree(bn)
html.startswith("<svg")
# True