class_docstr: Class that stores the results of a ActivityNet detection evaluation.
  
  Args:
      samples: the :class:`fiftyone.core.collections.SampleCollection` used
      config: the :class:`ActivityNetEvaluationConfig` used
      eval_key: the evaluation key
      matches: a list of
          ``(gt_label, pred_label, iou, pred_confidence, gt_id, pred_id)``
          matches. Either label can be ``None`` to indicate an unmatched
          segment
      precision: an array of precision values of shape
          ``num_iou_threshs x num_classes x num_recall``
      recall: an array of recall values
      classwise_AP: an array of average precision values of shape
          ``num_iou_threshs x num_classes``
      iou_threshs: an array of IoU thresholds
      classes: the list of possible classes
      thresholds (None): an optional array of decision thresholds of shape
          ``num_iou_threshs x num_classes x num_recall``
      missing (None): a missing label string. Any unmatched segments are
          given this label for evaluation purposes
      backend (None): a :class:`ActivityNetEvaluation` backend
class_docstr_tok: ["Class","that","stores","the","results","of","a","ActivityNet","detection","evaluation",".","Args",":","samples",":","the",":","class",":","`","fiftyone.core.collections.SampleCollection","`","used","config",":","the",":","class",":","`","ActivityNetEvaluationConfig","`","used","eval_key",":","the","evaluation","key","matches",":","a","list","of","``","(","gt_label",",","pred_label",",","iou",",","pred_confidence",",","gt_id",",","pred_id",")","``","matches",".","Either","label","can","be","``","None","``","to","indicate","an","unmatched","segment","precision",":","an","array","of","precision","values","of","shape","``","num_iou_threshs","x","num_classes","x","num_recall","``","recall",":","an","array","of","recall","values","classwise_AP",":","an","array","of","average","precision","values","of","shape","``","num_iou_threshs","x","num_classes","``","iou_threshs",":","an","array","of","IoU","thresholds","classes",":","the","list","of","possible","classes","thresholds","(","None",")",":","an","optional","array","of","decision","thresholds","of","shape","``","num_iou_threshs","x","num_classes","x","num_recall","``","missing","(","None",")",":","a","missing","label","string",".","Any","unmatched","segments","are","given","this","label","for","evaluation","purposes","backend","(","None",")",":","a",":","class",":","`","ActivityNetEvaluation","`","backend"]
docstr: Plots precision-recall (PR) curves for the results.
  
  Args:
      classes (None): a list of classes to generate curves for. By
          default, the top 3 AP classes will be plotted
      iou_thresh (None): an optional IoU threshold or list of IoU
          thresholds for which to plot curves. If multiple thresholds are
          provided, precision data is averaged across these thresholds.
          By default, precision data is averaged over all IoU thresholds.
          Refer to :attr:`iou_threshs` to see the available thresholds
      backend ("plotly"): the plotting backend to use. Supported values
          are ``("plotly", "matplotlib")``
      **kwargs: keyword arguments for the backend plotting method:
  
          -   "plotly" backend: :meth:`fiftyone.core.plots.plotly.plot_pr_curves`
          -   "matplotlib" backend: :meth:`fiftyone.core.plots.matplotlib.plot_pr_curves`
  
  Returns:
      one of the following:
  
      -   a :class:`fiftyone.core.plots.plotly.PlotlyNotebookPlot`, if
          you are working in a notebook context and the plotly backend is
          used
      -   a plotly or matplotlib figure, otherwise
docstr_tok: ["Plots","precision-recall","(","PR",")","curves","for","the","results",".","Args",":","classes","(","None",")",":","a","list","of","classes","to","generate","curves","for",".","By","default",",","the","top","3","AP","classes","will","be","plotted","iou_thresh","(","None",")",":","an","optional","IoU","threshold","or","list","of","IoU","thresholds","for","which","to","plot","curves",".","If","multiple","thresholds","are","provided",",","precision","data","is","averaged","across","these","thresholds",".","By","default",",","precision","data","is","averaged","over","all","IoU","thresholds",".","Refer","to",":","attr",":","`","iou_threshs","`","to","see","the","available","thresholds","backend","(","``","plotly","''",")",":","the","plotting","backend","to","use",".","Supported","values","are","``","(","``","plotly","''",",","``","matplotlib","''",")","``","*","*","kwargs",":","keyword","arguments","for","the","backend","plotting","method",":","-","``","plotly","''","backend",":",":","meth",":","`","fiftyone.core.plots.plotly.plot_pr_curves","`","-","``","matplotlib","''","backend",":",":","meth",":","`","fiftyone.core.plots.matplotlib.plot_pr_curves","`","Returns",":","one","of","the","following",":","-","a",":","class",":","`","fiftyone.core.plots.plotly.PlotlyNotebookPlot","`",",","if","you","are","working","in","a","notebook","context","and","the","plotly","backend","is","used","-","a","plotly","or","matplotlib","figure",",","otherwise"]
code: def plot_pr_curves(
      self, classes=None, iou_thresh=None, backend="plotly", **kwargs
  ):
      """Plots precision-recall (PR) curves for the results.
  
      Args:
          classes (None): a list of classes to generate curves for. By
              default, the top 3 AP classes will be plotted
          iou_thresh (None): an optional IoU threshold or list of IoU
              thresholds for which to plot curves. If multiple thresholds are
              provided, precision data is averaged across these thresholds.
              By default, precision data is averaged over all IoU thresholds.
              Refer to :attr:`iou_threshs` to see the available thresholds
          backend ("plotly"): the plotting backend to use. Supported values
              are ``("plotly", "matplotlib")``
          **kwargs: keyword arguments for the backend plotting method:
  
              -   "plotly" backend: :meth:`fiftyone.core.plots.plotly.plot_pr_curves`
              -   "matplotlib" backend: :meth:`fiftyone.core.plots.matplotlib.plot_pr_curves`
  
      Returns:
          one of the following:
  
          -   a :class:`fiftyone.core.plots.plotly.PlotlyNotebookPlot`, if
              you are working in a notebook context and the plotly backend is
              used
          -   a plotly or matplotlib figure, otherwise
      """
      if classes is None:
          inds = np.argsort(self._classwise_AP)[::-1][:3]
          classes = self.classes[inds]
  
      thresh_inds = self._get_iou_thresh_inds(iou_thresh=iou_thresh)
  
      precisions = []
  
      has_thresholds = self.thresholds is not None
      thresholds = [] if has_thresholds else None
  
      for c in classes:
          class_ind = self._get_class_index(c)
          precisions.append(
              np.mean(self.precision[thresh_inds, class_ind], axis=0)
          )
          if has_thresholds:
              thresholds.append(
                  np.mean(
                      self.thresholds[thresh_inds, class_ind], axis=0
                  )
              )
  
      return fop.plot_pr_curves(
          precisions,
          self.recall,
          classes,
          thresholds=thresholds,
          backend=backend,
          **kwargs,
      )
  
imports: import logging
  from collections import defaultdict
  import numpy
  import eta.core.utils
  import fiftyone.core.plots
  import fiftyone.utils.iou
  from .detection import DetectionEvaluation, DetectionEvaluationConfig, DetectionResults
label_desc: Use image node_id 2 for calling the ActivityNetDetectionResults obj's underlying member method code with example usage: obj.plot_pr_curves(classes, iou_thresh, backend) and returns: fop