class_docstr: A class to store the evaluation metrics.
docstr: Construct an EvaluationMetrics object to store the evaluation metrics.
  
  Args:
    num_class: A positive integer specifying the number of classes.
    top_k: A positive integer specifying how many predictions are considered per video.
  
  Raises:
    ValueError: An error occurred when MeanAveragePrecisionCalculator cannot
      not be constructed.
docstr_tok: ["Construct","an","EvaluationMetrics","object","to","store","the","evaluation","metrics",".","Args",":","num_class",":","A","positive","integer","specifying","the","number","of","classes",".","top_k",":","A","positive","integer","specifying","how","many","predictions","are","considered","per","video",".","Raises",":","ValueError",":","An","error","occurred","when","MeanAveragePrecisionCalculator","can","not","not","be","constructed","."]
code: def __init__(self, num_class, top_k):
      """Construct an EvaluationMetrics object to store the evaluation metrics.
  
      Args:
        num_class: A positive integer specifying the number of classes.
        top_k: A positive integer specifying how many predictions are considered per video.
  
      Raises:
        ValueError: An error occurred when MeanAveragePrecisionCalculator cannot
          not be constructed.
      """
      self.sum_hit_at_one = 0.0
      self.sum_perr = 0.0
      self.sum_loss = 0.0
      self.map_calculator = (
          map_calculator.MeanAveragePrecisionCalculator(num_class)
      )
      self.global_ap_calculator = (
          ap_calculator.AveragePrecisionCalculator()
      )
      self.top_k = top_k
      self.num_examples = 0
  
file_path: PaddleHub/modules/video/classification/videotag_tsn_lstm/resource/metrics/youtube8m/eval_util.py
imports: import datetime
  import numpy
  from .None import mean_average_precision_calculator
  from .None import average_precision_calculator
label_desc: Use image node_id 1 to create a new EvaluationMetrics object from inherited base classes: object with example: obj = EvaluationMetrics(num_class, top_k)