docstr: Helper method to build the Explanation object.
docstr_tok: ["Helper","method","to","build","the","Explanation","object","."]
code: def _build_explanation(
      self,
      ale_values: List[np.ndarray],
      ale0: List[np.ndarray],
      constant_value: float,
      feature_values: List[np.ndarray],
      feature_deciles: List[np.ndarray],
      feature_names: np.ndarray,
  ) -> Explanation:
      """
      Helper method to build the Explanation object.
      """
      # TODO decide on the format for these lists of arrays
      # Currently each list element relates to a feature and each column relates to an output dimension,
      # this is different from e.g. SHAP but arguably more convenient for ALE.
  
      data = copy.deepcopy(DEFAULT_DATA_ALE)
      data.update(
          ale_values=ale_values,
          ale0=ale0,
          constant_value=constant_value,
          feature_values=feature_values,
          feature_names=feature_names,
          target_names=self.target_names,
          feature_deciles=feature_deciles,
      )
  
      return Explanation(meta=copy.deepcopy(self.meta), data=data)
  
imports: import copy
  import math
  import numpy
  import pandas
  from itertools import count
  from functools import partial
  from typing import Callable, List, Optional, Tuple, Union, Dict, TYPE_CHECKING, no_type_check
  import sys
  import logging
  from alibi.api.interfaces import Explainer, Explanation
  from alibi.api.defaults import DEFAULT_META_ALE, DEFAULT_DATA_ALE
label_desc: Use image node_id 3 for calling the ALE obj's underlying member method code with example usage: obj._build_explanation(ale_values, ale0, constant_value, feature_values, feature_deciles, feature_names) and returns: Explanation