The indices in the sepset may not be compatible with the indices used in the PAG, when ruleR3(PAG, sepset, ...) is called.
This is, because the indices in the sepset depend on the order of nodes.
On the other hand, the indices returned by the PAG.node_map()-call within ruleR3 depend on the order of observed_nodes, which is random, as nodes are converted to a set before being passed to the constructor of the PAG.
This pull request proposes a simple reindexing before the call of ruleR3 and ruleR4b.
The indices in the
sepset
may not be compatible with the indices used in thePAG
, whenruleR3(PAG, sepset, ...)
is called. This is, because the indices in thesepset
depend on the order ofnodes
. On the other hand, the indices returned by thePAG.node_map()
-call withinruleR3
depend on the order ofobserved_nodes
, which is random, asnodes
are converted to aset
before being passed to the constructor of thePAG.
This pull request proposes a simple reindexing before the call of
ruleR3
andruleR4b
.