causy
causy copied to clipboard
Add advanced rules for conflict resolution in collider rule stage
At the moment, we implemented basic conflict resolution strategies for the collider rule stage in the PC algorithm (orientation rules -> collider test), namely:
- KEEP_FIRST: If an edge in an unshielded triple has been oriented as a collider and it is then attempted to be oriented as part of a second unshielded triple, the first orientation is kept and the other edge in the second unshielded triple is not oriented.
- KEEP_LAST: Works analogously with flipped order.
However, there are several enhancements that can be implemented:
- If an edge is trying to be oriented as part of a second unshielded triple and the orientations are compatible, i.e. x -> z <- y and x -> a <- y, orient both and not just the first or the last.
- If there are several options, choose the one with the highest probability (see e.g. causal learn's priority functions for a reference: https://github.com/py-why/causal-learn/blob/main/causallearn/utils/PCUtils/UCSepset.py)