CausalModel.children
- CausalModel.children(*args)
Return the children of a variable in the causal DAG.
- Parameters:
x (
int | str) – The variable (NodeId or name).- Returns:
NodeIds of the variable’s children in the causal DAG.
- Return type:
setofint
Example
import pyagrum as gum
bn = gum.fastBN("A->B;A->C")
cm = gum.CausalModel(bn)
sorted(cm.nameFromId(i) for i in cm.children("A"))
# ['B', 'C']
Class