class_docstr: Mean average precision metric for PASCAL V0C 07 dataset
  
  Parameters:
  ---------
  iou_thresh : float
      IOU overlap threshold for TP
  class_names : list of str
      optional, if provided, will print out AP for each class
class_docstr_tok: ["Mean","average","precision","metric","for","PASCAL","V0C","07","dataset","Parameters",":","--","--","--","--","-","iou_thresh",":","float","IOU","overlap","threshold","for","TP","class_names",":","list","of","str","optional",",","if","provided",",","will","print","out","AP","for","each","class"]
docstr: calculate average precision, override the default one,
  special 11-point metric
  
  Params:
  ----------
  rec : numpy.array
      cumulated recall
  prec : numpy.array
      cumulated precision
  Returns:
  ----------
  ap as float
docstr_tok: ["calculate","average","precision",",","override","the","default","one",",","special","11-point","metric","Params",":","--","--","--","--","--","rec",":","numpy.array","cumulated","recall","prec",":","numpy.array","cumulated","precision","Returns",":","--","--","--","--","--","ap","as","float"]
code: def _average_precision(self, rec, prec):
      """
      calculate average precision, override the default one,
      special 11-point metric
  
      Params:
      ----------
      rec : numpy.array
          cumulated recall
      prec : numpy.array
          cumulated precision
      Returns:
      ----------
      ap as float
      """
      if rec is None or prec is None:
          return np.nan
      ap = 0.0
      for t in np.arange(0.0, 1.1, 0.1):
          if np.sum(rec >= t) == 0:
              p = 0
          else:
              p = np.max(np.nan_to_num(prec)[rec >= t])
          ap += p / 11.0
      return ap
  
file_path: gluon-cv/gluoncv/utils/metrics/voc_detection.py
imports: from __future__ import division
  from collections import defaultdict
  import numpy
  import mxnet
  from ..bbox import bbox_iou
label_desc: Use image node_id 2 for calling the VOC07MApMetric obj's underlying member method code with example usage: obj._average_precision(rec, prec) and returns: ap, np