MarkovRandomField.loadGUMstring
- MarkovRandomField.loadGUMstring(content)
Deserialize a MarkovRandomField from a jgum JSON string.
- Parameters:
content (
str) – a JSON string in jgum format- Raises:
pyagrum.FatalError – If the string is not valid jgum JSON or the type field does not match
"MRF"- Return type:
None
See also
- JGUM / BGUM Format Reference
complete format reference
Example
import pyagrum as gum
mrf = gum.fastMRF("A--B;B--C")
s = mrf.saveGUMstring()
mrf2 = gum.MarkovRandomField()
mrf2.loadGUMstring(s)
mrf2.hasSameStructure(mrf)
# True
Class