Skip to content

Commit

Permalink
Merge pull request #7 from kirtanp/main
Browse files Browse the repository at this point in the history
Fix equality check on sufficient condition for existence of optimal adjustment
  • Loading branch information
esmucler committed May 7, 2024
2 parents d8f9133 + 22e84d8 commit f8f649a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimaladj/CausalGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def optimal_adj_set(self, treatment, outcome, L, N):
H1 = self.build_H1(treatment, outcome, L, N)
if treatment in H1.neighbors(outcome):
raise NoAdjException(EXCEPTION_NO_ADJ)
elif N == self.nodes() or set(N).issubset(
elif set(N) == set(self.nodes()) or set(N).issubset(
self.ancestors_all(L + [treatment, outcome])
):
optimal = nx.node_boundary(H1, set([outcome]))
Expand Down

0 comments on commit f8f649a

Please sign in to comment.