MarkovRandomField.variableFromName
- MarkovRandomField.variableFromName(name)
Return the variable with the given name.
- Parameters:
name (
str) – the name of the variable- Returns:
the variable
- Return type:
- Raises:
pyagrum.NotFound – if no variable with this name exists in the model
Example
import pyagrum as gum
mrf = gum.fastMRF("A--B;B--C")
print(mrf.variableFromName("C"))
# C:Range([0,1])
Class