class_docstr: Calculate predict-level variable attributions as Shapley Values
  
  Parameters
  -----------
  path : list of int, optional
      If specified, then attributions for this path will be plotted
      (default is `'average'`, which plots attribution means for `B` random paths).
  B : int, optional
      Number of random paths to calculate variable attributions (default is `25`).
  keep_distributions : bool, optional
      Save the distribution of partial predictions (default is `False`).
  processes : int, optional
      Number of parallel processes to use in calculations. Iterated over `B`
      (default is `1`, which means no parallel computation).
  random_state : int, optional
      Set seed for random number generator (default is random seed).
  
  Attributes
  -----------
  result : pd.DataFrame
      Main result attribute of an explanation.
  prediction : float
      Prediction for `new_observation`.
  intercept : float
      Average prediction for `data`.
  path : list of int or 'average'
      Path for which the attributions will be plotted.
  B : int
      Number of random paths to calculate variable attributions.
  keep_distributions : bool
      Save the distribution of partial predictions.
  yhats_distributions : pd.DataFrame or None
      The distribution of partial predictions.
  processes : int
      Number of parallel processes to use in calculations. Iterated over `B`.
  random_state : int or None
      Seed that was set for random number generator.
  
  Notes
  --------
  - https://pbiecek.github.io/ema/shapley.html
docstr: Calculate the result of explanation
  
  Fit method makes calculations in place and changes the attributes.
  
  Parameters
  -----------
  explainer : Explainer object
      Model wrapper created using the Explainer class.
  new_observation : pd.Series or np.ndarray
      An observation for which a prediction needs to be explained.
  
  Returns
  -----------
  None
code: def fit(self, explainer, new_observation):
      """Calculate the result of explanation
  
      Fit method makes calculations in place and changes the attributes.
  
      Parameters
      -----------
      explainer : Explainer object
          Model wrapper created using the Explainer class.
      new_observation : pd.Series or np.ndarray
          An observation for which a prediction needs to be explained.
  
      Returns
      -----------
      None
      """
  
      _new_observation = checks.check_new_observation(
          new_observation, explainer
      )
      checks.check_columns_in_new_observation(
          _new_observation, explainer
      )
      (
          self.result,
          self.prediction,
          self.intercept,
          self.yhats_distributions,
      ) = utils.shap(
          explainer,
          _new_observation,
          self.path,
          self.keep_distributions,
          self.B,
          self.processes,
          self.random_state,
      )
  
file_path: DALEX/python/dalex/dalex/predict_explanations/_shap/object.py
imports: import numpy
  import pandas
  from plotly.subplots import make_subplots
  from .None import checks, plot, utils
  from ...None import _theme, _global_checks
  from ..._explanation import Explanation
label_desc: Use image node_id 3 for calling the Shap obj's underlying member method code with example usage: obj.fit(explainer, new_observation) without return types