MarkovRandomField.size

MarkovRandomField.size()

Return the number of nodes (variables) in the graphical model.

Returns:

the number of nodes

Return type:

int

Example

import pyagrum as gum

mrf = gum.fastMRF("A--B;B--C")
mrf.size()
# 3

Class

MarkovRandomField