class_docstr: Exposes tree specific SHAP approximation, in interpret API form.
  If using this please cite the original authors as can be found here: https://github.com/slundberg/shap
docstr: Initializes class.
  
  Args:
      model: A tree object that works with Tree SHAP.
      data: Data used to initialize SHAP with.
      feature_names: List of feature names.
      feature_types: List of feature types.
      **kwargs: Kwargs that will be sent to shap.TreeExplainer
docstr_tok: ["Initializes","class",".","Args",":","model",":","A","tree","object","that","works","with","Tree","SHAP",".","data",":","Data","used","to","initialize","SHAP","with",".","feature_names",":","List","of","feature","names",".","feature_types",":","List","of","feature","types",".","*","*","kwargs",":","Kwargs","that","will","be","sent","to","shap.TreeExplainer"]
code: def __init__(
      self,
      model,
      data,
      feature_names=None,
      feature_types=None,
      **kwargs,
  ):
      """Initializes class.
  
      Args:
          model: A tree object that works with Tree SHAP.
          data: Data used to initialize SHAP with.
          feature_names: List of feature names.
          feature_types: List of feature types.
          **kwargs: Kwargs that will be sent to shap.TreeExplainer
      """
  
      from shap import TreeExplainer
  
      self.model = model
      self.feature_names = feature_names
      self.feature_types = feature_types
  
      self.feature_names_in_ = None
      self.feature_types_in_ = None
  
      if data is not None:
          # data can be None for some tree SHAP options
  
          data, n_samples = preclean_X(
              data, feature_names, feature_types
          )
  
          (
              data,
              self.feature_names_in_,
              self.feature_types_in_,
          ) = unify_data(
              data, n_samples, feature_names, feature_types, False, 0
          )
  
          # SHAP does not support string categoricals, and np.object_ is slower,
          # so convert to np.float64 until we implement some automatic categorical handling
          data = data.astype(np.float64, order="C", copy=False)
  
      self.shap_ = TreeExplainer(model, data, **kwargs)
  
file_path: interpret/python/interpret-core/interpret/greybox/_shaptree.py
imports: from ..utils._shap_common import shap_explain_local
  from interpret.api.base import ExplainerMixin
  import numpy
  from ..utils._clean_x import preclean_X
  from ..utils._unify_data import unify_data
label_desc: Use image node_id 1 to create a new ShapTree object from inherited base classes: ExplainerMixin with example: obj = ShapTree(model, data, feature_names, feature_types)