docstr: Show shap dependence graph
  
  Args:
      explainer (Explainer): explainer object constructed with either
                  ClassifierExplainer() or RegressionExplainer()
      title (str, optional): Title of tab or page. Defaults to
                  "Shap 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_color_col (bool, optional): hide color feature selector Defaults to False.
      hide_index (bool, optional): hide index selector Defaults to False.
      hide_selector (bool, optional): hide pos label selector. Defaults to False.
      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_outliers (bool, optional): Hide remove outliers toggle input. Defaults to False.
      hide_popout (bool, optional): hide popout button. Defaults to False.
      hide_footer (bool, optional): hide the footer.
      pos_label ({int, str}, optional): initial pos label.
                  Defaults to explainer.pos_label
      col (str, optional): Feature to display. Defaults to None.
      color_col (str, optional): Color plot by values of this Feature.
                  Defaults to None.
      index (int, optional): Highlight a particular index. Defaults to None.
      remove_outliers (bool, optional): remove outliers in feature and
          color feature from the plot.
      cats_topx (int, optional): maximum number of categories to display
          for categorical features. Defaults to 10.
      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: ["Show","shap","dependence","graph","Args",":","explainer","(","Explainer",")",":","explainer","object","constructed","with","either","ClassifierExplainer","(",")","or","RegressionExplainer","(",")","title","(","str",",","optional",")",":","Title","of","tab","or","page",".","Defaults","to","``","Shap","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_color_col","(","bool",",","optional",")",":","hide","color","feature","selector","Defaults","to","False",".","hide_index","(","bool",",","optional",")",":","hide","index","selector","Defaults","to","False",".","hide_selector","(","bool",",","optional",")",":","hide","pos","label","selector",".","Defaults","to","False",".","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_outliers","(","bool",",","optional",")",":","Hide","remove","outliers","toggle","input",".","Defaults","to","False",".","hide_popout","(","bool",",","optional",")",":","hide","popout","button",".","Defaults","to","False",".","hide_footer","(","bool",",","optional",")",":","hide","the","footer",".","pos_label","(","{","int",",","str","}",",","optional",")",":","initial","pos","label",".","Defaults","to","explainer.pos_label","col","(","str",",","optional",")",":","Feature","to","display",".","Defaults","to","None",".","color_col","(","str",",","optional",")",":","Color","plot","by","values","of","this","Feature",".","Defaults","to","None",".","index","(","int",",","optional",")",":","Highlight","a","particular","index",".","Defaults","to","None",".","remove_outliers","(","bool",",","optional",")",":","remove","outliers","in","feature","and","color","feature","from","the","plot",".","cats_topx","(","int",",","optional",")",":","maximum","number","of","categories","to","display","for","categorical","features",".","Defaults","to","10.","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="Shap Dependence",
      name=None,
      subtitle="Relationship between feature value and SHAP value",
      hide_title=False,
      hide_subtitle=False,
      hide_col=False,
      hide_color_col=False,
      hide_index=False,
      hide_selector=False,
      hide_outliers=False,
      hide_cats_topx=False,
      hide_cats_sort=False,
      hide_popout=False,
      hide_footer=False,
      pos_label=None,
      col=None,
      color_col=None,
      index=None,
      remove_outliers=False,
      cats_topx=10,
      cats_sort="freq",
      max_cat_colors=5,
      plot_sample=None,
      description=None,
      **kwargs,
  ):
      """Show shap dependence graph
  
      Args:
          explainer (Explainer): explainer object constructed with either
                      ClassifierExplainer() or RegressionExplainer()
          title (str, optional): Title of tab or page. Defaults to
                      "Shap 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_color_col (bool, optional): hide color feature selector Defaults to False.
          hide_index (bool, optional): hide index selector Defaults to False.
          hide_selector (bool, optional): hide pos label selector. Defaults to False.
          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_outliers (bool, optional): Hide remove outliers toggle input. Defaults to False.
          hide_popout (bool, optional): hide popout button. Defaults to False.
          hide_footer (bool, optional): hide the footer.
          pos_label ({int, str}, optional): initial pos label.
                      Defaults to explainer.pos_label
          col (str, optional): Feature to display. Defaults to None.
          color_col (str, optional): Color plot by values of this Feature.
                      Defaults to None.
          index (int, optional): Highlight a particular index. Defaults to None.
          remove_outliers (bool, optional): remove outliers in feature and
              color feature from the plot.
          cats_topx (int, optional): maximum number of categories to display
              for categorical features. Defaults to 10.
          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 = self.explainer.columns_ranked_by_shap()[0]
      if self.color_col is None:
          self.color_col = self.explainer.top_shap_interactions(
              self.col
          )[1]
  
      self.selector = PosLabelSelector(
          explainer, name=self.name, pos_label=pos_label
      )
  
      self.index_selector = IndexSelector(
          explainer,
          "shap-dependence-index-" + self.name,
          index=index,
          **kwargs,
      )
      self.index_name = "shap-dependence-index-" + self.name
  
      if self.description is None:
          self.description = """
          This plot shows the relation between feature values and shap values.
          This allows you to investigate the general relationship between feature
          value and impact on the prediction. You can check whether the model
          uses features in line with your intuitions, or use the plots to learn
          about the relationships that the model has learned between the input features
          and the predicted outcome.
          """
      self.popout = GraphPopout(
          "shap-dependence-" + self.name + "popout",
          "shap-dependence-graph-" + self.name,
          self.title,
          self.description,
      )
      self.register_dependencies("shap_values_df")
  
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 ShapDependenceComponent object from inherited base classes: ExplainerComponent with example: obj = ShapDependenceComponent(explainer, title, name, subtitle, hide_title, hide_subtitle, hide_col, hide_color_col, hide_index, hide_selector, hide_outliers, hide_cats_topx, hide_cats_sort, hide_popout, hide_footer, pos_label, col, color_col, index, remove_outliers, cats_topx, cats_sort, max_cat_colors, plot_sample, description)