py-why / causal-learn

Causal Discovery in Python. It also includes (conditional) independence tests and score functions.
https://causal-learn.readthedocs.io/en/latest/
MIT License
1.04k stars 174 forks source link

Update FCI.py for fixing isNoncollider #179

Closed svenpieper closed 2 months ago

svenpieper commented 2 months ago

Editing isNoncollider() for FCI Algo

Fixing Bug: If sep_sets does not contain certain node combination, it will led to a KeyError.

With this fix, None will automatically set by the get() func. Also get_node_map() will only called once to check set_sets for content, thus make it a bit more efficient.