class_docstr: Error Analysis for Classification and Regression
class_docstr_tok: ["Error","Analysis","for","Classification","and","Regression"]
docstr: Add error analysis by class
  
  Args:
      mode (str): Model Model - classification/regression model
      error_stats (dict): A dictionary maps the label to its aggregated statistics
      stats_type (str): The defined stats_type for statistical analysis
      k (int): The k value of the defined stats_type
      top (int): the number of top explanation to display
      notes(str): text to explain the block
docstr_tok: ["Add","error","analysis","by","class","Args",":","mode","(","str",")",":","Model","Model","-","classification\/regression","model","error_stats","(","dict",")",":","A","dictionary","maps","the","label","to","its","aggregated","statistics","stats_type","(","str",")",":","The","defined","stats_type","for","statistical","analysis","k","(","int",")",":","The","k","value","of","the","defined","stats_type","top","(","int",")",":","the","number","of","top","explanation","to","display","notes","(","str",")",":","text","to","explain","the","block"]
code: def __init__(
      self,
      mode: str,
      error_stats: dict,
      stats_type: str,
      k: int,
      top: int = 15,
      notes=None,
  ) -> None:
      """
      Add error analysis by class
  
      Args:
          mode (str): Model Model - classification/regression model
          error_stats (dict): A dictionary maps the label to its aggregated statistics
          stats_type (str): The defined stats_type for statistical analysis
          k (int): The k value of the defined stats_type
          top (int): the number of top explanation to display
          notes(str): text to explain the block
      """
      super(ErrorAnalysis, self).__init__(mode, error_stats, top, notes)
      self._mode = mode
      self._error_stats = error_stats
      self._stats_type = stats_type
      self._k = k
      self._top = top
      if not (notes is None):
          self._notes = notes
      else:
          self._notes = "This section shows {} error analysis.".format(
              mode
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from xai.formatter.contents.base import Content
  from xai.formatter.writer.base import Writer
label_desc: Use image node_id 1 to create a new ErrorAnalysis object from inherited base classes: Content with example: obj = ErrorAnalysis(mode, error_stats, stats_type, k, top, notes)