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

Fixed Issue#129 #161

Closed zhi-yi-huang closed 5 months ago

zhi-yi-huang commented 5 months ago

Updates

Description

The sepset had been initialized with an empty set. But it should be recorded in cg.sepset when x and y are d-separated, given by sepset. Otherwise, sepset (the empty set) will be recorded in cg.sepset.

Test Plan

python -m unittest tests.TestPC # should pass
python -m unittest tests.TestSkeletonDiscovery # should pass

image

kunwuz commented 5 months ago

Thanks for the fix!