class_docstr: Explains a model using expected gradients (an extension of integrated gradients).
  
  Expected gradients an extension of the integrated gradients method (Sundararajan et al. 2017), a
  feature attribution method designed for differentiable models based on an extension of Shapley
  values to infinite player games (Aumann-Shapley values). Integrated gradients values are a bit
  different from SHAP values, and require a single reference value to integrate from. As an adaptation
  to make them approximate SHAP values, expected gradients reformulates the integral as an expectation
  and combines that expectation with sampling reference values from the background dataset. This leads
  to a single combined expectation of gradients that converges to attributions that sum to the
  difference between the expected model output and the current output.
  
  Examples
  --------
  See :ref:`Gradient Explainer Examples <gradient_explainer_examples>`
docstr: Return an explanation object for the model applied to X.
  
  Parameters
  ----------
  X : list,
      if framework == 'tensorflow': numpy.array, or pandas.DataFrame
      if framework == 'pytorch': torch.tensor
      A tensor (or list of tensors) of samples (where X.shape[0] == # samples) on which to
      explain the model's output.
  nsamples : int
      number of background samples
  Returns
  -------
  shap.Explanation:
docstr_tok: ["Return","an","explanation","object","for","the","model","applied","to","X.","Parameters","--","--","--","--","--","X",":","list",",","if","framework","==","'tensorflow","'",":","numpy.array",",","or","pandas.DataFrame","if","framework","==","'pytorch","'",":","torch.tensor","A","tensor","(","or","list","of","tensors",")","of","samples","(","where","X.shape","[","0","]","==","#","samples",")","on","which","to","explain","the","model","'s","output",".","nsamples",":","int","number","of","background","samples","Returns","--","--","--","-","shap.Explanation",":"]
code: def __call__(self, X, nsamples=200):
      """Return an explanation object for the model applied to X.
  
      Parameters
      ----------
      X : list,
          if framework == 'tensorflow': numpy.array, or pandas.DataFrame
          if framework == 'pytorch': torch.tensor
          A tensor (or list of tensors) of samples (where X.shape[0] == # samples) on which to
          explain the model's output.
      nsamples : int
          number of background samples
      Returns
      -------
      shap.Explanation:
      """
      shap_values = self.shap_values(X, nsamples)
      return Explanation(
          values=shap_values, data=X, feature_names=self.features
      )
  
imports: import warnings
  import numpy
  import pandas
  from packaging import version
  from .._explanation import Explanation
  from ..explainers._explainer import Explainer
  from ..explainers.tf_utils import _get_graph, _get_model_inputs, _get_model_output, _get_session
label_desc: Use image node_id 2 for calling the GradientExplainer obj's underlying member method code with example usage: obj.__call__(X, nsamples) and returns: Explanation