Issue
I was trying to use the ges function and evaluate its performance. It throws a KeyError due to None type in node_map inside the graph class output by GES (see 'Error messge'). I am wondering if the ges.py should provide an argument in the class to add nodenames like pc.py. I don't see anywhere in ges.py that updates the argument node_map in the estimated graph class. Since I got the same error with pc.py, but after providing a list of node names to node_names in pc.py, PC was working fine.
Data format snapshot
Code to reproduce
This is the code I used following the guidelines in the TestGES.py
Traceback (most recent call last):
File "/Users/lee4094/Github/loci-po/experiment.py", line 443, in <module>
ges_ac = ArrowConfusion(true_cpdag, ges_g['G'])
File "/Users/lee4094/miniconda3/envs/locipo/lib/python3.10/site-packages/causallearn/graph/ArrowConfusion.py", line 45, in __init__
if est.get_endpoint(est.get_node(nodes_name[i]), est.get_node(nodes_name[j])) == Endpoint.ARROW:
File "/Users/lee4094/miniconda3/envs/locipo/lib/python3.10/site-packages/causallearn/graph/GeneralGraph.py", line 615, in get_endpoint
edge = self.get_edge(node1, node2)
File "/Users/lee4094/miniconda3/envs/locipo/lib/python3.10/site-packages/causallearn/graph/GeneralGraph.py", line 533, in get_edge
i = self.node_map[node1]
KeyError: None
Issue I was trying to use the
ges
function and evaluate its performance. It throws a KeyError due to None type innode_map
inside the graph class output by GES (see 'Error messge'). I am wondering if theges.py
should provide an argument in the class to addnodenames
likepc.py
. I don't see anywhere inges.py
that updates the argumentnode_map
in the estimated graph class. Since I got the same error withpc.py
, but after providing a list of node names tonode_names
inpc.py
, PC was working fine.Data format snapshot
Code to reproduce
This is the code I used following the guidelines in the
TestGES.py
Error message