class_docstr: Performs Partial Dependence Plot (PDP) analysis for interaction between two features.
  
  Attributes
  ----------
  model : object
      A trained model object. The model should have a `predict` or
      `predict_proba` method. Otherwise a custom prediction function should be
      provided through `pred_func`.
  n_classes : int
      Number of classes. If it is None, will infer from `model.n_classes_`.
      Please set it as 0 for regression.
  pred_func : callable
      A custom prediction function. If not provided, `predict` or `predict_proba`
      method of `model` is used to generate the predictions.
  model_features : list of str
      A list of features used in model prediction.
  memory_limit : float
      The maximum proportion of memory that can be used by the calculation
      process.
  chunk_size : int
      The number of samples to predict at each iteration. -1 means all samples at
      once.
  n_jobs : int
      The number of jobs to run in parallel for computation. If set to -1, all
      CPUs are used.
  predict_kwds : dict
      Additional keyword arguments to pass to the `model`'s predict function.
  data_transformer : callable
      A function to transform the input data before prediction.
  dist_num_samples : int
      The number of samples to use for estimating the distribution of the data.
      This is used to handle large datasets by sampling a smaller subset for
      efficiency.
  plot_type : str
      The type of the plot to be generated.
  features : list
      List of column name(s) for the 2 chosen features. The length of the list
      should be strictly 2.
  feature_names : list
      List of custom names for the 2 chosen features. The length of the list
      should be strictly 2.
  pdp_isolate_objs : list of :class:`PDPIsolate`
      A list of `PDPIsolate` objects, for two features.
  n_grids : int
      The number of feature grids. For interact plot, it is the product of
      `n_grids` of two features.
  feature_grid_combos : numpy.ndarray
      A 2D array that contains the combinations of feature grids. The shape of
      the array is (n_grids, ...).
  from_model : bool
      A flag indicating if the prediction function was obtained from the model or
      was provided as input.
  target : list of int
      List of target indices. For binary and regression problems, the list will
      be just [0]. For multi-class targets, the list is the class indices.
  results : list of :class:`PDResults`
      The results of the Partial Dependence Plot (PDP) analysis. For binary and
      regression problems, the list will contain a single `PDResults` object. For
      multi-class targets, the list will contain a `PDResults` object for each
      class.
  
  Methods
  -------
  plot(**kwargs) :
      Generates the PDP plot.
class_docstr_tok: ["Performs","Partial","Dependence","Plot","(","PDP",")","analysis","for","interaction","between","two","features",".","Attributes","--","--","--","--","--","model",":","object","A","trained","model","object",".","The","model","should","have","a","`","predict","`","or","`","predict_proba","`","method",".","Otherwise","a","custom","prediction","function","should","be","provided","through","`","pred_func","`",".","n_classes",":","int","Number","of","classes",".","If","it","is","None",",","will","infer","from","`","model.n_classes_","`",".","Please","set","it","as","0","for","regression",".","pred_func",":","callable","A","custom","prediction","function",".","If","not","provided",",","`","predict","`","or","`","predict_proba","`","method","of","`","model","`","is","used","to","generate","the","predictions",".","model_features",":","list","of","str","A","list","of","features","used","in","model","prediction",".","memory_limit",":","float","The","maximum","proportion","of","memory","that","can","be","used","by","the","calculation","process",".","chunk_size",":","int","The","number","of","samples","to","predict","at","each","iteration",".","-1","means","all","samples","at","once",".","n_jobs",":","int","The","number","of","jobs","to","run","in","parallel","for","computation",".","If","set","to","-1",",","all","CPUs","are","used",".","predict_kwds",":","dict","Additional","keyword","arguments","to","pass","to","the","`","model","`","'s","predict","function",".","data_transformer",":","callable","A","function","to","transform","the","input","data","before","prediction",".","dist_num_samples",":","int","The","number","of","samples","to","use","for","estimating","the","distribution","of","the","data",".","This","is","used","to","handle","large","datasets","by","sampling","a","smaller","subset","for","efficiency",".","plot_type",":","str","The","type","of","the","plot","to","be","generated",".","features",":","list","List","of","column","name","(","s",")","for","the","2","chosen","features",".","The","length","of","the","list","should","be","strictly","2.","feature_names",":","list","List","of","custom","names","for","the","2","chosen","features",".","The","length","of","the","list","should","be","strictly","2.","pdp_isolate_objs",":","list","of",":","class",":","`","PDPIsolate","`","A","list","of","`","PDPIsolate","`","objects",",","for","two","features",".","n_grids",":","int","The","number","of","feature","grids",".","For","interact","plot",",","it","is","the","product","of","`","n_grids","`","of","two","features",".","feature_grid_combos",":","numpy.ndarray","A","2D","array","that","contains","the","combinations","of","feature","grids",".","The","shape","of","the","array","is","(","n_grids",",","...",")",".","from_model",":","bool","A","flag","indicating","if","the","prediction","function","was","obtained","from","the","model","or","was","provided","as","input",".","target",":","list","of","int","List","of","target","indices",".","For","binary","and","regression","problems",",","the","list","will","be","just","[","0","]",".","For","multi-class","targets",",","the","list","is","the","class","indices",".","results",":","list","of",":","class",":","`","PDResults","`","The","results","of","the","Partial","Dependence","Plot","(","PDP",")","analysis",".","For","binary","and","regression","problems",",","the","list","will","contain","a","single","`","PDResults","`","object",".","For","multi-class","targets",",","the","list","will","contain","a","`","PDResults","`","object","for","each","class",".","Methods","--","--","--","-","plot","(","*","*","kwargs",")",":","Generates","the","PDP","plot","."]
docstr: Generates the Partial Dependence Plot (PDP).
  
  Parameters
  ----------
  plot_type : {'grid', 'contour'}, optional
      The type of interaction plot to be generated. Default is contour.
  plot_pdp : bool, optional
      If it is True, pdp for each feature will be plotted. Default is False.
  to_bins : bool, optional
      If True, the axis will be converted to bins. Only applicable for numeric
      feature. Default is True.
  show_percentile : bool, optional
      If True, percentiles are shown in the plot. Default is False.
  which_classes : list of int, optional
      List of class indices to plot. If None, all classes will be plotted.
      Default is None.
  figsize : tuple or None, optional
      The figure size for matplotlib or plotly figure. If None, the default
      figure size is used. Default is None.
  dpi : int, optional
      The resolution of the plot, measured in dots per inch. Only applicable when
      `engine` is 'matplotlib'. Default is 300.
  ncols : int, optional
      The number of columns of subplots in the figure. Default is 2.
  plot_params : dict or None, optional
      Custom plot parameters that control the style and aesthetics of the plot.
      Default is None.
  engine : {'matplotlib', 'plotly'}, optional
      The plotting engine to use. Default is plotly.
  template : str, optional
      The template to use for plotly plots. Only applicable when `engine` is
      'plotly'. Reference: https://plotly.com/python/templates/ Default is
      plotly_white.
  
  Returns
  -------
  matplotlib.figure.Figure or plotly.graph_objects.Figure
      A Matplotlib or Plotly figure object depending on the plot engine being
      used.
  dict of matplotlib.axes.Axes or None
      A dictionary of Matplotlib axes objects. The keys are the names of the
      axes. The values are the axes objects. If `engine` is 'ploltly', it is
      None.
docstr_tok: ["Generates","the","Partial","Dependence","Plot","(","PDP",")",".","Parameters","--","--","--","--","--","plot_type",":","{","'grid","'",",","'contour","'","}",",","optional","The","type","of","interaction","plot","to","be","generated",".","Default","is","contour",".","plot_pdp",":","bool",",","optional","If","it","is","True",",","pdp","for","each","feature","will","be","plotted",".","Default","is","False",".","to_bins",":","bool",",","optional","If","True",",","the","axis","will","be","converted","to","bins",".","Only","applicable","for","numeric","feature",".","Default","is","True",".","show_percentile",":","bool",",","optional","If","True",",","percentiles","are","shown","in","the","plot",".","Default","is","False",".","which_classes",":","list","of","int",",","optional","List","of","class","indices","to","plot",".","If","None",",","all","classes","will","be","plotted",".","Default","is","None",".","figsize",":","tuple","or","None",",","optional","The","figure","size","for","matplotlib","or","plotly","figure",".","If","None",",","the","default","figure","size","is","used",".","Default","is","None",".","dpi",":","int",",","optional","The","resolution","of","the","plot",",","measured","in","dots","per","inch",".","Only","applicable","when","`","engine","`","is","'matplotlib","'",".","Default","is","300.","ncols",":","int",",","optional","The","number","of","columns","of","subplots","in","the","figure",".","Default","is","2.","plot_params",":","dict","or","None",",","optional","Custom","plot","parameters","that","control","the","style","and","aesthetics","of","the","plot",".","Default","is","None",".","engine",":","{","'matplotlib","'",",","'plotly","'","}",",","optional","The","plotting","engine","to","use",".","Default","is","plotly",".","template",":","str",",","optional","The","template","to","use","for","plotly","plots",".","Only","applicable","when","`","engine","`","is","'plotly","'",".","Reference",":","https",":","\/\/plotly.com\/python\/templates\/","Default","is","plotly_white",".","Returns","--","--","--","-","matplotlib.figure.Figure","or","plotly.graph_objects.Figure","A","Matplotlib","or","Plotly","figure","object","depending","on","the","plot","engine","being","used",".","dict","of","matplotlib.axes.Axes","or","None","A","dictionary","of","Matplotlib","axes","objects",".","The","keys","are","the","names","of","the","axes",".","The","values","are","the","axes","objects",".","If","`","engine","`","is","'ploltly","'",",","it","is","None","."]
code: def plot(
      self,
      plot_type="contour",
      plot_pdp=False,
      to_bins=True,
      show_percentile=False,
      which_classes=None,
      figsize=None,
      dpi=300,
      ncols=2,
      plot_params=None,
      engine="plotly",
      template="plotly_white",
  ):
      """
      Generates the Partial Dependence Plot (PDP).
  
      Parameters
      ----------
      plot_type : {'grid', 'contour'}, optional
          The type of interaction plot to be generated. Default is contour.
      plot_pdp : bool, optional
          If it is True, pdp for each feature will be plotted. Default is False.
      to_bins : bool, optional
          If True, the axis will be converted to bins. Only applicable for numeric
          feature. Default is True.
      show_percentile : bool, optional
          If True, percentiles are shown in the plot. Default is False.
      which_classes : list of int, optional
          List of class indices to plot. If None, all classes will be plotted.
          Default is None.
      figsize : tuple or None, optional
          The figure size for matplotlib or plotly figure. If None, the default
          figure size is used. Default is None.
      dpi : int, optional
          The resolution of the plot, measured in dots per inch. Only applicable when
          `engine` is 'matplotlib'. Default is 300.
      ncols : int, optional
          The number of columns of subplots in the figure. Default is 2.
      plot_params : dict or None, optional
          Custom plot parameters that control the style and aesthetics of the plot.
          Default is None.
      engine : {'matplotlib', 'plotly'}, optional
          The plotting engine to use. Default is plotly.
      template : str, optional
          The template to use for plotly plots. Only applicable when `engine` is
          'plotly'. Reference: https://plotly.com/python/templates/ Default is
          plotly_white.
  
      Returns
      -------
      matplotlib.figure.Figure or plotly.graph_objects.Figure
          A Matplotlib or Plotly figure object depending on the plot engine being
          used.
      dict of matplotlib.axes.Axes or None
          A dictionary of Matplotlib axes objects. The keys are the names of the
          axes. The values are the axes objects. If `engine` is 'ploltly', it is
          None.
      """
      if plot_params is None:
          plot_params = {}
  
      _check_plot_engine(engine)
      _check_pdp_interact_plot_type(plot_type)
      feature_types = [
          obj.feature_info.type for obj in self.pdp_isolate_objs
      ]
  
      if (
          not all(v == "numeric" for v in feature_types)
          or plot_pdp
          or plot_type == "grid"
      ):
          to_bins = True
  
      if not to_bins and any(v == "numeric" for v in feature_types):
          show_percentile = False
  
      plot_params.update(
          {
              "ncols": ncols,
              "figsize": figsize,
              "dpi": dpi,
              "template": template,
              "engine": engine,
              "n_grids": [obj.n_grids for obj in self.pdp_isolate_objs],
              "plot_pdp": plot_pdp,
              "to_bins": to_bins,
              "plot_type": plot_type,
              "show_percentile": show_percentile,
          }
      )
  
      which_classes = _check_classes(which_classes, self.n_classes)
      plot_engine = PDPInteractPlotEngine(
          self, which_classes, plot_params
      )
      return plot_engine.plot()
  
imports: from .pdp_utils import PDPIsolatePlotEngine, PDPInteractPlotEngine
  from .utils import _check_frac_to_plot, _make_list, _check_classes, _calc_n_jobs, FeatureInfo, _check_model, _calc_preds, _expand_params_for_interact, _check_dataset, _check_cluster_params, _check_plot_engine, _check_pdp_interact_plot_type
  import pandas
  import numpy
  from pqdm.processes import pqdm
  from tqdm.auto import tqdm
  import warnings
label_desc: Use image node_id 5 for calling the PDPInteract obj's underlying member method code with example usage: obj.plot(plot_type, plot_pdp, to_bins, show_percentile, which_classes, figsize, dpi, ncols, plot_params, engine, template) and returns: plot_engine