class_docstr: Implements methods for finding optimal (efficient) backdoor sets.
class_docstr_tok: ["Implements","methods","for","finding","optimal","(","efficient",")","backdoor","sets","."]
docstr: Given a set S of vertices in the flow network D, returns the
  operator h(S), a set of vertices in the undirected graph H1.
  
  See Smucler and Rotnitzky (2022), Journal of Causal Inference, for the
  full definition of this operator.
  
  :param S: set
      A set of vertices in the flow network D associated treatment,
      outcome, conditional and observable variables.
  :returns Z: set
      The set obtained from applying the h operator to S.
docstr_tok: ["Given","a","set","S","of","vertices","in","the","flow","network","D",",","returns","the","operator","h","(","S",")",",","a","set","of","vertices","in","the","undirected","graph","H1",".","See","Smucler","and","Rotnitzky","(","2022",")",",","Journal","of","Causal","Inference",",","for","the","full","definition","of","this","operator",".",":","param","S",":","set","A","set","of","vertices","in","the","flow","network","D","associated","treatment",",","outcome",",","conditional","and","observable","variables",".",":","returns","Z",":","set","The","set","obtained","from","applying","the","h","operator","to","S","."]
code: def h_operator(self, S):
      """Given a set S of vertices in the flow network D, returns the
      operator h(S), a set of vertices in the undirected graph H1.
  
      See Smucler and Rotnitzky (2022), Journal of Causal Inference, for the
      full definition of this operator.
  
      :param S: set
          A set of vertices in the flow network D associated treatment,
          outcome, conditional and observable variables.
      :returns Z: set
          The set obtained from applying the h operator to S.
      """
      Z = set()
      for node in self.graph.nodes:
          nodep = node + "'"
          nodepp = node + "''"
          condition = nodep in S and nodepp not in S
          if condition:
              Z.add(node)
      return Z
  
file_path: dowhy/dowhy/causal_identifier/efficient_backdoor.py
imports: from typing import List
  import networkx
  import numpy
label_desc: Use image node_id 12 for calling the EfficientBackdoor obj's underlying member method code with example usage: obj.h_operator(S) and returns: Z