class_docstr: This class is to calculate mean average precision.
    
docstr: Accumulate the predictions and their ground truth labels.
  
  Args:
    predictions: A list of lists storing the prediction scores. The outer
    dimension corresponds to classes.
    actuals: A list of lists storing the ground truth labels. The dimensions
    should correspond to the predictions input. Any value
    larger than 0 will be treated as positives, otherwise as negatives.
    num_positives: If provided, it is a list of numbers representing the
    number of true positives for each class. If not provided, the number of
    true positives will be inferred from the 'actuals' array.
  
  Raises:
    ValueError: An error occurred when the shape of predictions and actuals
    does not match.
docstr_tok: ["Accumulate","the","predictions","and","their","ground","truth","labels",".","Args",":","predictions",":","A","list","of","lists","storing","the","prediction","scores",".","The","outer","dimension","corresponds","to","classes",".","actuals",":","A","list","of","lists","storing","the","ground","truth","labels",".","The","dimensions","should","correspond","to","the","predictions","input",".","Any","value","larger","than","0","will","be","treated","as","positives",",","otherwise","as","negatives",".","num_positives",":","If","provided",",","it","is","a","list","of","numbers","representing","the","number","of","true","positives","for","each","class",".","If","not","provided",",","the","number","of","true","positives","will","be","inferred","from","the","'actuals","'","array",".","Raises",":","ValueError",":","An","error","occurred","when","the","shape","of","predictions","and","actuals","does","not","match","."]
code: def accumulate(self, predictions, actuals, num_positives=None):
      """Accumulate the predictions and their ground truth labels.
  
      Args:
        predictions: A list of lists storing the prediction scores. The outer
        dimension corresponds to classes.
        actuals: A list of lists storing the ground truth labels. The dimensions
        should correspond to the predictions input. Any value
        larger than 0 will be treated as positives, otherwise as negatives.
        num_positives: If provided, it is a list of numbers representing the
        number of true positives for each class. If not provided, the number of
        true positives will be inferred from the 'actuals' array.
  
      Raises:
        ValueError: An error occurred when the shape of predictions and actuals
        does not match.
      """
      if not num_positives:
          num_positives = [None for i in predictions.shape[1]]
  
      calculators = self._ap_calculators
      for i in range(len(predictions)):
          calculators[i].accumulate(
              predictions[i], actuals[i], num_positives[i]
          )
  
file_path: PaddleHub/modules/video/classification/videotag_tsn_lstm/resource/metrics/youtube8m/mean_average_precision_calculator.py
imports: import numpy
  from .None import average_precision_calculator
label_desc: Use image node_id 2 for calling the MeanAveragePrecisionCalculator obj's underlying member method code with example usage: obj.accumulate(predictions, actuals, num_positives) without return types