Skip to content

Commit

Permalink
Update discover_latent_nodes.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Dec 14, 2023
1 parent c630187 commit bf2ae23
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/eliater/discover_latent_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,12 @@ def remove_nuisance_variables(
:param tag: The tag for which variables are latent
:return: the new graph after simplification
"""
rv = NxMixedGraph(
directed=graph.directed.copy(),
undirected=graph.undirected.copy(),
)
lv_dag = mark_nuisance_variables_as_latent(
graph=graph, treatments=treatments, outcomes=outcomes, tag=tag
graph=rv, treatments=treatments, outcomes=outcomes, tag=tag
)
simplified_latent_dag = simplify_latent_dag(lv_dag, tag=tag)
return NxMixedGraph.from_latent_variable_dag(simplified_latent_dag.graph, tag=tag)
Expand Down

0 comments on commit bf2ae23

Please sign in to comment.