class_docstr: `PredictPlot` for interaction between two features.
  
  Attributes
  ----------
  df : pd.DataFrame
      A processed DataFrame that includes feature and target (for target plot) or
      predict (for predict plot) columns, feature buckets, along with the count
      of samples within each bucket.
  feature_infos : list of :class:`FeatureInfo`
      A list of `FeatureInfo` objects.
  feature_cols : list of str
      List of feature columns.
  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.
  n_classes : int
      The number of classes provided, or inferred from the model when it is not
      provided.
  plot_type : str
      The type of the plot to be generated.
  plot_engines : dict
      A dictionary that maps plot types to their plotting engines.
  summary_df : pd.DataFrame
      A DataFrame that contains the summary statistics of target (for target
      plot) or predict (for predict plot) values for each feature bucket.
  plot_df : pd.DataFrame
      A DataFrame that contains the aggregated target (for target plot) or
      predict (for predict plot) values for each unique pair of feature values.
  
  Methods
  -------
  plot(**kwargs) :
      Generates the plot.
class_docstr_tok: ["`","PredictPlot","`","for","interaction","between","two","features",".","Attributes","--","--","--","--","--","df",":","pd.DataFrame","A","processed","DataFrame","that","includes","feature","and","target","(","for","target","plot",")","or","predict","(","for","predict","plot",")","columns",",","feature","buckets",",","along","with","the","count","of","samples","within","each","bucket",".","feature_infos",":","list","of",":","class",":","`","FeatureInfo","`","A","list","of","`","FeatureInfo","`","objects",".","feature_cols",":","list","of","str","List","of","feature","columns",".","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",".","n_classes",":","int","The","number","of","classes","provided",",","or","inferred","from","the","model","when","it","is","not","provided",".","plot_type",":","str","The","type","of","the","plot","to","be","generated",".","plot_engines",":","dict","A","dictionary","that","maps","plot","types","to","their","plotting","engines",".","summary_df",":","pd.DataFrame","A","DataFrame","that","contains","the","summary","statistics","of","target","(","for","target","plot",")","or","predict","(","for","predict","plot",")","values","for","each","feature","bucket",".","plot_df",":","pd.DataFrame","A","DataFrame","that","contains","the","aggregated","target","(","for","target","plot",")","or","predict","(","for","predict","plot",")","values","for","each","unique","pair","of","feature","values",".","Methods","--","--","--","-","plot","(","*","*","kwargs",")",":","Generates","the","plot","."]
docstr: Initialize an `InteractPredictPlot` instance.
  
  Parameters
  ----------
  df : pd.DataFrame
      A DataFrame that at least contains columns specified by `model_features`.
  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.
  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`.
  model_features : list of str
      A list of features used in model prediction.
  pred_func : callable, optional
      A custom prediction function. If not provided, `predict` or `predict_proba`
      method of `model` is used to generate the predictions. Default is None.
  n_classes : int, optional
      Number of classes. If it is None, will infer from `model.n_classes_`.
      Please set it as 0 for regression. Default is None.
  predict_kwds : dict, optional
      Additional keyword arguments to pass to the `model`'s predict function.
      Default is None.
  chunk_size : int, optional
      The number of samples to predict at each iteration. -1 means all samples at
      once. Default is -1.
  num_grid_points : int or list of int, optional
      The number of grid points to use. Only applicable for numeric feature. For
      interact plot, it can also be a list of two integers, indicating the number
      of grid points for each feature. Default is 10.
  grid_types : str or list of str, optional
      Same as `grid_type`, but could be a list of two strings, indicating the
      grid type for each feature. Default is percentile.
  percentile_ranges : tuple or a list of tuples, optional
      Same as `percentile_range`, but could be a list of two tuples, indicating
      the percentile range for each feature. Default is None.
  grid_ranges : tuple or list of tuples, optional
      Same as `grid_range`, but could be a list of two tuples, indicating the
      grid range for each feature. Default is None.
  cust_grid_points : array-like or list of arrays, optional
      Custom grid points for the feature. For interact plot, it can also be a
      list of two arrays, indicating the grid points for each feature. Default is
      None.
  show_outliers : bool or list of bool, optional
      Whether to show outliers in the plot. Only applicable for numeric feature.
      For interact plot, it can also be a list of two booleans, indicating
      whether to show outliers for each feature. Default is False.
  endpoints : bool or list of bool, optional
      Same as `endpoint`, but could be a list of two booleans, indicating whether
      to include the endpoint for each feature. Default is True.
docstr_tok: ["Initialize","an","`","InteractPredictPlot","`","instance",".","Parameters","--","--","--","--","--","df",":","pd.DataFrame","A","DataFrame","that","at","least","contains","columns","specified","by","`","model_features","`",".","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.","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","`",".","model_features",":","list","of","str","A","list","of","features","used","in","model","prediction",".","pred_func",":","callable",",","optional","A","custom","prediction","function",".","If","not","provided",",","`","predict","`","or","`","predict_proba","`","method","of","`","model","`","is","used","to","generate","the","predictions",".","Default","is","None",".","n_classes",":","int",",","optional","Number","of","classes",".","If","it","is","None",",","will","infer","from","`","model.n_classes_","`",".","Please","set","it","as","0","for","regression",".","Default","is","None",".","predict_kwds",":","dict",",","optional","Additional","keyword","arguments","to","pass","to","the","`","model","`","'s","predict","function",".","Default","is","None",".","chunk_size",":","int",",","optional","The","number","of","samples","to","predict","at","each","iteration",".","-1","means","all","samples","at","once",".","Default","is","-1.","num_grid_points",":","int","or","list","of","int",",","optional","The","number","of","grid","points","to","use",".","Only","applicable","for","numeric","feature",".","For","interact","plot",",","it","can","also","be","a","list","of","two","integers",",","indicating","the","number","of","grid","points","for","each","feature",".","Default","is","10.","grid_types",":","str","or","list","of","str",",","optional","Same","as","`","grid_type","`",",","but","could","be","a","list","of","two","strings",",","indicating","the","grid","type","for","each","feature",".","Default","is","percentile",".","percentile_ranges",":","tuple","or","a","list","of","tuples",",","optional","Same","as","`","percentile_range","`",",","but","could","be","a","list","of","two","tuples",",","indicating","the","percentile","range","for","each","feature",".","Default","is","None",".","grid_ranges",":","tuple","or","list","of","tuples",",","optional","Same","as","`","grid_range","`",",","but","could","be","a","list","of","two","tuples",",","indicating","the","grid","range","for","each","feature",".","Default","is","None",".","cust_grid_points",":","array-like","or","list","of","arrays",",","optional","Custom","grid","points","for","the","feature",".","For","interact","plot",",","it","can","also","be","a","list","of","two","arrays",",","indicating","the","grid","points","for","each","feature",".","Default","is","None",".","show_outliers",":","bool","or","list","of","bool",",","optional","Whether","to","show","outliers","in","the","plot",".","Only","applicable","for","numeric","feature",".","For","interact","plot",",","it","can","also","be","a","list","of","two","booleans",",","indicating","whether","to","show","outliers","for","each","feature",".","Default","is","False",".","endpoints",":","bool","or","list","of","bool",",","optional","Same","as","`","endpoint","`",",","but","could","be","a","list","of","two","booleans",",","indicating","whether","to","include","the","endpoint","for","each","feature",".","Default","is","True","."]
code: def __init__(
      self,
      df,
      features,
      feature_names,
      model,
      model_features,
      pred_func=None,
      n_classes=None,
      predict_kwds=None,
      chunk_size=-1,
      num_grid_points=10,
      grid_types="percentile",
      percentile_ranges=None,
      grid_ranges=None,
      cust_grid_points=None,
      show_outliers=False,
      endpoints=True,
  ):
      """
      Initialize an `InteractPredictPlot` instance.
  
      Parameters
      ----------
      df : pd.DataFrame
          A DataFrame that at least contains columns specified by `model_features`.
      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.
      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`.
      model_features : list of str
          A list of features used in model prediction.
      pred_func : callable, optional
          A custom prediction function. If not provided, `predict` or `predict_proba`
          method of `model` is used to generate the predictions. Default is None.
      n_classes : int, optional
          Number of classes. If it is None, will infer from `model.n_classes_`.
          Please set it as 0 for regression. Default is None.
      predict_kwds : dict, optional
          Additional keyword arguments to pass to the `model`'s predict function.
          Default is None.
      chunk_size : int, optional
          The number of samples to predict at each iteration. -1 means all samples at
          once. Default is -1.
      num_grid_points : int or list of int, optional
          The number of grid points to use. Only applicable for numeric feature. For
          interact plot, it can also be a list of two integers, indicating the number
          of grid points for each feature. Default is 10.
      grid_types : str or list of str, optional
          Same as `grid_type`, but could be a list of two strings, indicating the
          grid type for each feature. Default is percentile.
      percentile_ranges : tuple or a list of tuples, optional
          Same as `percentile_range`, but could be a list of two tuples, indicating
          the percentile range for each feature. Default is None.
      grid_ranges : tuple or list of tuples, optional
          Same as `grid_range`, but could be a list of two tuples, indicating the
          grid range for each feature. Default is None.
      cust_grid_points : array-like or list of arrays, optional
          Custom grid points for the feature. For interact plot, it can also be a
          list of two arrays, indicating the grid points for each feature. Default is
          None.
      show_outliers : bool or list of bool, optional
          Whether to show outliers in the plot. Only applicable for numeric feature.
          For interact plot, it can also be a list of two booleans, indicating
          whether to show outliers for each feature. Default is False.
      endpoints : bool or list of bool, optional
          Same as `endpoint`, but could be a list of two booleans, indicating whether
          to include the endpoint for each feature. Default is True.
      """
      super().__init__(
          df,
          features,
          feature_names,
          None,
          model,
          model_features,
          pred_func,
          n_classes,
          predict_kwds,
          chunk_size,
          plot_type="interact_predict",
          num_grid_points=num_grid_points,
          grid_types=grid_types,
          percentile_ranges=percentile_ranges,
          grid_ranges=grid_ranges,
          cust_grid_points=cust_grid_points,
          show_outliers=show_outliers,
          endpoints=endpoints,
      )
  
imports: from .info_plot_utils import TargetPlotEngine, PredictPlotEngine, InteractInfoPlotEngine
  from .utils import _make_list, _check_target, _q1, _q2, _q3, FeatureInfo, _check_dataset, _check_model, _calc_preds, _check_classes, _expand_params_for_interact
  import pandas
  from itertools import product
label_desc: Use image node_id 1 to create a new InteractPredictPlot object from inherited base classes: _InteractInfoPlot with example: obj = InteractPredictPlot(df, features, feature_names, model, model_features, pred_func, n_classes, predict_kwds, chunk_size, num_grid_points, grid_types, percentile_ranges, grid_ranges, cust_grid_points, show_outliers, endpoints)