py-why / causal-learn

Causal Discovery in Python. It also includes (conditional) independence tests and score functions.

Home Page:https://causal-learn.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A potential Bug in GES.py

tingyushi opened this issue · comments

Hello,

I was looking at ges function implemented in GES.py.

In line 141 and line 142, the code was trying to find the adjacent nodes of $X_i$.

Ti = np.union1d(np.where(G.graph[:, i] != Endpoint.NULL.value)[0],
                           np.where(G.graph[i, 0] != Endpoint.NULL.value)[0])  # adjacent to Xi

For the second argument of np.union1d, should we change to the following?

Ti = np.union1d(np.where(G.graph[:, i] != Endpoint.NULL.value)[0],
                           np.where(G.graph[i, :] != Endpoint.NULL.value)[0])  # adjacent to Xi

Thanks!!!

Thanks! This has been fixed by @zhi-yi-huang in #165