docstr: Interaction Dependence Component.
  
  Shows two graphs:
      top graph: col vs interact_col
      bottom graph: interact_col vs col
  
  Args:
      explainer (Explainer): explainer object constructed with either
                  ClassifierExplainer() or RegressionExplainer()
      title (str, optional): Title of tab or page. Defaults to
                  "Interactions Dependence".
      name (str, optional): unique name to add to Component elements.
                  If None then random uuid is generated to make sure
                  it's unique. Defaults to None.
      subtitle (str): subtitle
      hide_title (bool, optional): Hide component title. Defaults to False.
      hide_subtitle (bool, optional): Hide subtitle. Defaults to False.
      hide_col (bool, optional): Hide feature selector. Defaults to False.
      hide_interact_col (bool, optional): Hide interaction
                  feature selector. Defaults to False.
      hide_highlight (bool, optional): Hide highlight index selector.
                  Defaults to False.
      hide_selector (bool, optional): hide pos label selector.
                  Defaults to False.
      hide_outliers (bool, optional): Hide remove outliers toggle input. Defaults to False.
      hide_popout (bool, optional): hide popout button
      hide_cats_topx (bool, optional): hide the categories topx input.
                  Defaults to False.
      hide_cats_sort (bool, optional): hide the categories sort selector.
                  Defaults to False.
      hide_top (bool, optional): Hide the top interaction graph
                  (col vs interact_col). Defaults to False.
      hide_bottom (bool, optional): hide the bottom interaction graph
                  (interact_col vs col). Defaults to False.
      pos_label ({int, str}, optional): initial pos label.
                  Defaults to explainer.pos_label
      col (str, optional): Feature to find interactions for. Defaults to None.
      interact_col (str, optional): Feature to interact with. Defaults to None.
      highlight (int, optional): Index row to highlight Defaults to None.
      remove_outliers (bool, optional): remove outliers in feature and
          color feature from the plot.
      cats_topx (int, optional): number of categories to display for
          categorical features.
      cats_sort (str, optional): how to sort categories: 'alphabet',
          'freq' or 'shap'. Defaults to 'freq'.
      max_cat_colors (int, optional): for categorical features, maximum number
          of categories to label with own color. Defaults to 5.
      plot_sample (int, optional): Instead of all points only plot a random
          sample of points. Defaults to None (=all points)
      description (str, optional): Tooltip to display when hover over
          component title. When None default text is shown.
docstr_tok: ["Interaction","Dependence","Component",".","Shows","two","graphs",":","top","graph",":","col","vs","interact_col","bottom","graph",":","interact_col","vs","col","Args",":","explainer","(","Explainer",")",":","explainer","object","constructed","with","either","ClassifierExplainer","(",")","or","RegressionExplainer","(",")","title","(","str",",","optional",")",":","Title","of","tab","or","page",".","Defaults","to","``","Interactions","Dependence","''",".","name","(","str",",","optional",")",":","unique","name","to","add","to","Component","elements",".","If","None","then","random","uuid","is","generated","to","make","sure","it","'s","unique",".","Defaults","to","None",".","subtitle","(","str",")",":","subtitle","hide_title","(","bool",",","optional",")",":","Hide","component","title",".","Defaults","to","False",".","hide_subtitle","(","bool",",","optional",")",":","Hide","subtitle",".","Defaults","to","False",".","hide_col","(","bool",",","optional",")",":","Hide","feature","selector",".","Defaults","to","False",".","hide_interact_col","(","bool",",","optional",")",":","Hide","interaction","feature","selector",".","Defaults","to","False",".","hide_highlight","(","bool",",","optional",")",":","Hide","highlight","index","selector",".","Defaults","to","False",".","hide_selector","(","bool",",","optional",")",":","hide","pos","label","selector",".","Defaults","to","False",".","hide_outliers","(","bool",",","optional",")",":","Hide","remove","outliers","toggle","input",".","Defaults","to","False",".","hide_popout","(","bool",",","optional",")",":","hide","popout","button","hide_cats_topx","(","bool",",","optional",")",":","hide","the","categories","topx","input",".","Defaults","to","False",".","hide_cats_sort","(","bool",",","optional",")",":","hide","the","categories","sort","selector",".","Defaults","to","False",".","hide_top","(","bool",",","optional",")",":","Hide","the","top","interaction","graph","(","col","vs","interact_col",")",".","Defaults","to","False",".","hide_bottom","(","bool",",","optional",")",":","hide","the","bottom","interaction","graph","(","interact_col","vs","col",")",".","Defaults","to","False",".","pos_label","(","{","int",",","str","}",",","optional",")",":","initial","pos","label",".","Defaults","to","explainer.pos_label","col","(","str",",","optional",")",":","Feature","to","find","interactions","for",".","Defaults","to","None",".","interact_col","(","str",",","optional",")",":","Feature","to","interact","with",".","Defaults","to","None",".","highlight","(","int",",","optional",")",":","Index","row","to","highlight","Defaults","to","None",".","remove_outliers","(","bool",",","optional",")",":","remove","outliers","in","feature","and","color","feature","from","the","plot",".","cats_topx","(","int",",","optional",")",":","number","of","categories","to","display","for","categorical","features",".","cats_sort","(","str",",","optional",")",":","how","to","sort","categories",":","'alphabet","'",",","'freq","'","or","'shap","'",".","Defaults","to","'freq","'",".","max_cat_colors","(","int",",","optional",")",":","for","categorical","features",",","maximum","number","of","categories","to","label","with","own","color",".","Defaults","to","5.","plot_sample","(","int",",","optional",")",":","Instead","of","all","points","only","plot","a","random","sample","of","points",".","Defaults","to","None","(","=all","points",")","description","(","str",",","optional",")",":","Tooltip","to","display","when","hover","over","component","title",".","When","None","default","text","is","shown","."]
code: def __init__(
      self,
      explainer,
      title="Interaction Dependence",
      name=None,
      subtitle="Relation between feature value and shap interaction value",
      hide_title=False,
      hide_subtitle=False,
      hide_col=False,
      hide_interact_col=False,
      hide_index=False,
      hide_popout=False,
      hide_selector=False,
      hide_outliers=False,
      hide_cats_topx=False,
      hide_cats_sort=False,
      hide_top=False,
      hide_bottom=False,
      pos_label=None,
      col=None,
      interact_col=None,
      remove_outliers=False,
      cats_topx=10,
      cats_sort="freq",
      max_cat_colors=5,
      plot_sample=None,
      description=None,
      index=None,
      **kwargs,
  ):
      """Interaction Dependence Component.
  
      Shows two graphs:
          top graph: col vs interact_col
          bottom graph: interact_col vs col
  
      Args:
          explainer (Explainer): explainer object constructed with either
                      ClassifierExplainer() or RegressionExplainer()
          title (str, optional): Title of tab or page. Defaults to
                      "Interactions Dependence".
          name (str, optional): unique name to add to Component elements.
                      If None then random uuid is generated to make sure
                      it's unique. Defaults to None.
          subtitle (str): subtitle
          hide_title (bool, optional): Hide component title. Defaults to False.
          hide_subtitle (bool, optional): Hide subtitle. Defaults to False.
          hide_col (bool, optional): Hide feature selector. Defaults to False.
          hide_interact_col (bool, optional): Hide interaction
                      feature selector. Defaults to False.
          hide_highlight (bool, optional): Hide highlight index selector.
                      Defaults to False.
          hide_selector (bool, optional): hide pos label selector.
                      Defaults to False.
          hide_outliers (bool, optional): Hide remove outliers toggle input. Defaults to False.
          hide_popout (bool, optional): hide popout button
          hide_cats_topx (bool, optional): hide the categories topx input.
                      Defaults to False.
          hide_cats_sort (bool, optional): hide the categories sort selector.
                      Defaults to False.
          hide_top (bool, optional): Hide the top interaction graph
                      (col vs interact_col). Defaults to False.
          hide_bottom (bool, optional): hide the bottom interaction graph
                      (interact_col vs col). Defaults to False.
          pos_label ({int, str}, optional): initial pos label.
                      Defaults to explainer.pos_label
          col (str, optional): Feature to find interactions for. Defaults to None.
          interact_col (str, optional): Feature to interact with. Defaults to None.
          highlight (int, optional): Index row to highlight Defaults to None.
          remove_outliers (bool, optional): remove outliers in feature and
              color feature from the plot.
          cats_topx (int, optional): number of categories to display for
              categorical features.
          cats_sort (str, optional): how to sort categories: 'alphabet',
              'freq' or 'shap'. Defaults to 'freq'.
          max_cat_colors (int, optional): for categorical features, maximum number
              of categories to label with own color. Defaults to 5.
          plot_sample (int, optional): Instead of all points only plot a random
              sample of points. Defaults to None (=all points)
          description (str, optional): Tooltip to display when hover over
              component title. When None default text is shown.
      """
      super().__init__(explainer, title, name)
  
      if self.col is None:
          self.col = explainer.columns_ranked_by_shap()[0]
      if self.interact_col is None:
          self.interact_col = explainer.top_shap_interactions(self.col)[
              1
          ]
  
      self.index_selector = IndexSelector(
          explainer,
          "interaction-dependence-index-" + self.name,
          index=index,
          **kwargs,
      )
      self.index_name = "interaction-dependence-index-" + self.name
  
      self.selector = PosLabelSelector(
          explainer, name=self.name, pos_label=pos_label
      )
      self.popout_top = GraphPopout(
          self.name + "popout-top",
          "interaction-dependence-top-graph-" + self.name,
          self.title,
      )
  
      if self.description is None:
          self.description = """
          This plot shows the relation between feature values and shap interaction values.
          This allows you to investigate interactions between features in determining
          the prediction of the model.
          """
      self.popout_bottom = GraphPopout(
          self.name + "popout-bottom",
          "interaction-dependence-bottom-graph-" + self.name,
          self.title,
          self.description,
      )
      self.register_dependencies("shap_interaction_values")
  
imports: import dash
  from dash import html, dcc, Input, Output, State
  from dash.exceptions import PreventUpdate
  import dash_bootstrap_components
  from ..dashboard_methods import *
  from ..None import to_html
label_desc: Use image node_id 1 to create a new InteractionDependenceComponent object from inherited base classes: ExplainerComponent with example: obj = InteractionDependenceComponent(explainer, title, name, subtitle, hide_title, hide_subtitle, hide_col, hide_interact_col, hide_index, hide_popout, hide_selector, hide_outliers, hide_cats_topx, hide_cats_sort, hide_top, hide_bottom, pos_label, col, interact_col, remove_outliers, cats_topx, cats_sort, max_cat_colors, plot_sample, description, index)