class_docstr: Computes SHAP values for generalized additive models.
  
  This assumes that the model only has first-order effects. Extending this to
  second- and third-order effects is future work (if you apply this to those models right now
  you will get incorrect answers that fail additivity).
docstr: Explains a single row and returns the tuple (row_values, row_expected_values, row_mask_shapes).
          
docstr_tok: ["Explains","a","single","row","and","returns","the","tuple","(","row_values",",","row_expected_values",",","row_mask_shapes",")","."]
code: def explain_row(
      self,
      *row_args,
      max_evals,
      main_effects,
      error_bounds,
      batch_size,
      outputs,
      silent,
  ):
      """Explains a single row and returns the tuple (row_values, row_expected_values, row_mask_shapes)."""
  
      x = row_args[0]
      inputs = np.zeros((len(x), len(x)))
      for i in range(len(x)):
          inputs[i, i] = x[i]
  
      phi = self.model(inputs) - self._zero_offset - self._input_offsets
  
      return {
          "values": phi,
          "expected_values": self._expected_value,
          "mask_shapes": [a.shape for a in row_args],
          "main_effects": phi,
          "clustering": getattr(self.masker, "clustering", None),
      }
  
file_path: shap/shap/explainers/_additive.py
imports: import numpy
  from ..utils import MaskedModel, safe_isinstance
  from ._explainer import Explainer
label_desc: Use image node_id 4 for calling the AdditiveExplainer obj's underlying member method code with example usage: obj.explain_row() and returns: dict