docstr:  Plots dependency of shapley values for a specified feature, colored by an interaction feature.
   Skips the calculation part if shap_dict is given.
  
   This plots the value of the feature on the x-axis and the SHAP value of the same feature
   on the y-axis. This shows how the model depends on the given feature, and is like a
   richer extension of the classical partial dependence plots. Vertical dispersion of the
   data points represents interaction effects.
  
  Args:
       treatment_group (str or int): name of treatment group to create dependency plot on
       feature_idx (str or int): feature index/name to create dependency plot on
       shap_dict (optional, dict): a dict of shapley value matrices. If None, shap_dict will be computed.
       interaction_idx (optional, str or int): feature index/name used in coloring scheme as interaction feature.
           If "auto" then shap.common.approximate_interactions is used to pick what seems to be the
           strongest interaction (note that to find to true strongest interaction you need to compute
           the SHAP interaction values).
docstr_tok: ["Plots","dependency","of","shapley","values","for","a","specified","feature",",","colored","by","an","interaction","feature",".","Skips","the","calculation","part","if","shap_dict","is","given",".","This","plots","the","value","of","the","feature","on","the","x-axis","and","the","SHAP","value","of","the","same","feature","on","the","y-axis",".","This","shows","how","the","model","depends","on","the","given","feature",",","and","is","like","a","richer","extension","of","the","classical","partial","dependence","plots",".","Vertical","dispersion","of","the","data","points","represents","interaction","effects",".","Args",":","treatment_group","(","str","or","int",")",":","name","of","treatment","group","to","create","dependency","plot","on","feature_idx","(","str","or","int",")",":","feature","index\/name","to","create","dependency","plot","on","shap_dict","(","optional",",","dict",")",":","a","dict","of","shapley","value","matrices",".","If","None",",","shap_dict","will","be","computed",".","interaction_idx","(","optional",",","str","or","int",")",":","feature","index\/name","used","in","coloring","scheme","as","interaction","feature",".","If","``","auto","''","then","shap.common.approximate_interactions","is","used","to","pick","what","seems","to","be","the","strongest","interaction","(","note","that","to","find","to","true","strongest","interaction","you","need","to","compute","the","SHAP","interaction","values",")","."]
code: def plot_shap_dependence(
      self,
      treatment_group,
      feature_idx,
      shap_dict=None,
      interaction_idx="auto",
      **kwargs,
  ):
      """
       Plots dependency of shapley values for a specified feature, colored by an interaction feature.
       Skips the calculation part if shap_dict is given.
  
       This plots the value of the feature on the x-axis and the SHAP value of the same feature
       on the y-axis. This shows how the model depends on the given feature, and is like a
       richer extension of the classical partial dependence plots. Vertical dispersion of the
       data points represents interaction effects.
  
      Args:
           treatment_group (str or int): name of treatment group to create dependency plot on
           feature_idx (str or int): feature index/name to create dependency plot on
           shap_dict (optional, dict): a dict of shapley value matrices. If None, shap_dict will be computed.
           interaction_idx (optional, str or int): feature index/name used in coloring scheme as interaction feature.
               If "auto" then shap.common.approximate_interactions is used to pick what seems to be the
               strongest interaction (note that to find to true strongest interaction you need to compute
               the SHAP interaction values).
      """
      if shap_dict is None:
          shap_dict = self.get_shap_values()
  
      shap_values = shap_dict[treatment_group]
  
      shap.dependence_plot(
          feature_idx,
          shap_values,
          self.X,
          interaction_index=interaction_idx,
          feature_names=self.features,
          **kwargs,
      )
  
imports: import pandas
  import shap
  import matplotlib.pyplot
  from lightgbm import LGBMRegressor
  from sklearn.inspection import permutation_importance
  from sklearn.model_selection import train_test_split
  from copy import deepcopy
  from causalml.inference.meta.utils import convert_pd_to_np
label_desc: Use image node_id 11 for calling the Explainer obj's underlying member method code with example usage: obj.plot_shap_dependence(treatment_group, feature_idx, shap_dict, interaction_idx) without return types