class_docstr: Implements methods for finding optimal (efficient) backdoor sets.
class_docstr_tok: ["Implements","methods","for","finding","optimal","(","efficient",")","backdoor","sets","."]
docstr: Returns a min-cut in the flow network D associated with
  treatment, outcome, conditional and observable variables that is
  contained in any other min-cut.
  
  :returns S_c: set
      The min-cut with the above property.
docstr_tok: ["Returns","a","min-cut","in","the","flow","network","D","associated","with","treatment",",","outcome",",","conditional","and","observable","variables","that","is","contained","in","any","other","min-cut",".",":","returns","S_c",":","set","The","min-cut","with","the","above","property","."]
code: def compute_smallest_mincut(self):
      """Returns a min-cut in the flow network D associated with
      treatment, outcome, conditional and observable variables that is
      contained in any other min-cut.
  
      :returns S_c: set
          The min-cut with the above property.
      """
      D = self.build_D()
      _, flow_dict = nx.algorithms.flow.maximum_flow(
          flowG=D,
          _s=self.outcome_name + "''",
          _t=self.treatment_name + "'",
      )
      queu = [self.outcome_name + "''"]
      S_c = set()
      visited = set()
      while len(queu) > 0:
          node = queu.pop()
          if node not in visited:
              visited.add(node)
              point_in = D.in_edges(node)
              point_out = D.out_edges(node)
              for edge in point_out:
                  capacity = D.edges[edge]["capacity"]
                  flow = flow_dict[edge[0]][edge[1]]
                  if flow < capacity:
                      queu.append(edge[1])
                      S_c.add(edge[1])
              for edge in point_in:
                  flow = flow_dict[edge[0]][edge[1]]
                  if flow > 0:
                      queu.append(edge[0])
                      S_c.add(edge[0])
      return S_c
  
file_path: dowhy/dowhy/causal_identifier/efficient_backdoor.py
imports: from typing import List
  import networkx
  import numpy
label_desc: Use image node_id 11 for calling the EfficientBackdoor obj's underlying member method code with example usage: obj.compute_smallest_mincut() and returns: S_c