Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Simple Example #11

Open
XinyiYS opened this issue Sep 29, 2020 · 1 comment
Open

Error in Simple Example #11

XinyiYS opened this issue Sep 29, 2020 · 1 comment

Comments

@XinyiYS
Copy link

XinyiYS commented Sep 29, 2020

In the code provided in the readme for Simple Example, the line
iv = dag.optimal_intervention(cpdag=cpdag) seems to cause an error due to missing function optimal_intervention().

Upon further investigation, I tried replacing this function with with dag.greedy_optimal_single_node_intervention() or dag.greedy_optimal_fully_orienting_interventions(), another error arises:

Traceback (most recent call last):
icpdag = dag.interventional_cpdag([iv], cpdag=cpdag)
"causaldag/causaldag/classes/dag.py", line 1660, in interventional_cpdag
cut_edges.update({(i, j) for i, j in self._arcs if len({i, j} & set(iv_nodes)) == 1})
"causaldag/causaldag/classes/dag.py", line 1660, in
cut_edges.update({(i, j) for i, j in self._arcs if len({i, j} & set(iv_nodes)) == 1})
TypeError: unhashable type: 'list'

@XinyiYS
Copy link
Author

XinyiYS commented Sep 29, 2020

Replacing dag.optimal_intervention() with dag.optimal_fully_orienting_interventions() seems to solve the issue and give the specified answer.

Feel free to close this issue if that was correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant