MarkovRandomField.toDotAsFactorGraph

MarkovRandomField.toDotAsFactorGraph(*args)

Return a Graphviz dot representation of the Markov random field as a factor graph.

Parameters:

options (pyagrum.DotOptions, optional) – what is given to the drawing beyond the look of pyagrum.config (size, label, colors of some nodes, width of some arcs…).

Returns:

a dot-format string with variable nodes and factor nodes

Return type:

str

Example

import pyagrum as gum

mrf = gum.fastMRF("A--B;B--C")
s = mrf.toDotAsFactorGraph()
s.startswith("graph")
# True

Class

MarkovRandomField