lib.notebook.getCausalModel

pyagrum.lib.notebook.getCausalModel(cm, size=None)

return a HTML representing the causal model

Parameters:
  • cm (CausalModel) – the causal model

  • size (int | str) – the size of the rendered graph

Returns:

the dot representation

Return type:

pydot.Dot

Example

import pyagrum as gum
import pyagrum.lib.notebook as gnb

cm = gum.CausalModel(gum.fastBN("X->Y->Z"))
html = gnb.getCausalModel(cm)
html.startswith("<svg")
# True