class_docstr: Explanation for a single target or class.
  Feature weights are stored in the :feature_weights: attribute,
  and features highlighted in text in the :weighted_spans: attribute.
  
  Spatial values are stored in the :heatmap: attribute.
class_docstr_tok: ["Explanation","for","a","single","target","or","class",".","Feature","weights","are","stored","in","the",":","feature_weights",":","attribute",",","and","features","highlighted","in","text","in","the",":","weighted_spans",":","attribute",".","Spatial","values","are","stored","in","the",":","heatmap",":","attribute","."]
code: def __init__(
      self,
      target,  # type: Union[str, int]
      feature_weights=None,  # type: Optional[FeatureWeights]
      proba=None,  # type: Optional[float]
      score=None,  # type: Optional[float]
      weighted_spans=None,  # type: Optional[WeightedSpans]
      heatmap=None,  # type: Optional[np.ndarray]
  ):
      # type: (...) -> None
      self.target = target
      self.feature_weights = feature_weights
      self.proba = proba
      self.score = score
      self.weighted_spans = weighted_spans
      self.heatmap = heatmap
  
imports: from typing import Any, List, Tuple, Union, Optional
  import numpy
  from .base_utils import attrs
  from .formatters.features import FormattedFeatureName
label_desc: Use image node_id 1 to create a new TargetExplanation object from inherited base classes: object with example: obj = TargetExplanation(target, feature_weights, proba, score, weighted_spans, heatmap)