class_docstr: Base class for all sklearn wrappers of the StructureModel.
  Implements the sklearn .fit and .predict interface.
class_docstr_tok: ["Base","class","for","all","sklearn","wrappers","of","the","StructureModel",".","Implements","the","sklearn",".fit","and",".predict","interface","."]
docstr: Plot the DAG of the fitted model.
  Args:
      enforce_dag: Whether to threshold the model until it is a DAG.
      Does not alter the underlying model.
  
      plot_structure_kwargs: Dictionary of kwargs for the causalnex plotting module.
      layout_kwargs: Dictionary to set the `layout` and `physics` of the graph.
      Example:
      ::
          >>> layout_kwargs = {
                  "physics": {
                      "solver": "repulsion"
                      },
                  "layout": {
                      "hierarchical": {
                          "enabled": True
                          }
                      }
                  }
      output_filename: If provided, write html to a given path, e.g. "./plot.html"
  
  Returns:
      Plot of the DAG with the proper encoding to run on Windows machines.
docstr_tok: ["Plot","the","DAG","of","the","fitted","model",".","Args",":","enforce_dag",":","Whether","to","threshold","the","model","until","it","is","a","DAG",".","Does","not","alter","the","underlying","model",".","plot_structure_kwargs",":","Dictionary","of","kwargs","for","the","causalnex","plotting","module",".","layout_kwargs",":","Dictionary","to","set","the","`","layout","`","and","`","physics","`","of","the","graph",".","Example",":",":",":",">",">",">","layout_kwargs","=","{","``","physics","''",":","{","``","solver","''",":","``","repulsion","''","}",",","``","layout","''",":","{","``","hierarchical","''",":","{","``","enabled","''",":","True","}","}","}","output_filename",":","If","provided",",","write","html","to","a","given","path",",","e.g",".","``",".\/plot.html","''","Returns",":","Plot","of","the","DAG","with","the","proper","encoding","to","run","on","Windows","machines","."]
code: def plot_dag(
      self,
      output_filename: str,
      enforce_dag: bool = False,
      plot_structure_kwargs: Dict[str, Dict] = None,
      layout_kwargs: Dict[str, Dict] = None,
  ) -> IFrame:
      """
      Plot the DAG of the fitted model.
      Args:
          enforce_dag: Whether to threshold the model until it is a DAG.
          Does not alter the underlying model.
  
          plot_structure_kwargs: Dictionary of kwargs for the causalnex plotting module.
          layout_kwargs: Dictionary to set the `layout` and `physics` of the graph.
          Example:
          ::
              >>> layout_kwargs = {
                      "physics": {
                          "solver": "repulsion"
                          },
                      "layout": {
                          "hierarchical": {
                              "enabled": True
                              }
                          }
                      }
          output_filename: If provided, write html to a given path, e.g. "./plot.html"
  
      Returns:
          Plot of the DAG with the proper encoding to run on Windows machines.
      """
  
      # handle thresholding
      check_is_fitted(self)
      graph = copy.deepcopy(self.graph_)
      if enforce_dag:
          graph.threshold_till_dag()
  
      # handle the plot kwargs
      plt_kwargs_default = {
          "all_node_attributes": NODE_STYLE.WEAK,
          "all_edge_attributes": EDGE_STYLE.WEAK,
      }
  
      plt_kwargs = plt_kwargs_default
  
      if plot_structure_kwargs:
          plt_kwargs.update(plot_structure_kwargs)
  
      return display_plot_ipython(
          viz=plot_structure(graph, **plt_kwargs),
          layout_kwargs=layout_kwargs,
          output_filename=output_filename,
      )
  
imports: import copy
  from abc import ABCMeta
  from typing import Dict, Iterable, List, Union
  import numpy
  import pandas
  from IPython.lib.display import IFrame
  from sklearn.base import BaseEstimator
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils.validation import check_is_fitted, check_X_y
  from causalnex.plots import EDGE_STYLE, NODE_STYLE, display_plot_ipython, plot_structure
  from causalnex.structure.pytorch import notears
label_desc: Use image node_id 8 for calling the DAGBase obj's underlying member method code with example usage: obj.plot_dag(output_filename, enforce_dag, plot_structure_kwargs, layout_kwargs) and returns: display_plot_ipython