Skip to content

Error in Simple Example #11

@XinyiYS

Description

@XinyiYS

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions