class_docstr: Precision-Recall Area under the curve.
  
  Args:
      num_classes (int): Number of classes
      n_bins (int): number of confidence threshold to evaluate on.
      average (bool): If true will return the mean AuC of all classes.
class_docstr_tok: ["Precision-Recall","Area","under","the","curve",".","Args",":","num_classes","(","int",")",":","Number","of","classes","n_bins","(","int",")",":","number","of","confidence","threshold","to","evaluate","on",".","average","(","bool",")",":","If","true","will","return","the","mean","AuC","of","all","classes","."]
docstr: Update the confusion matrice according to output and target.
  
  Args:
      output (tensor): predictions of model
      target (tensor): labels
docstr_tok: ["Update","the","confusion","matrice","according","to","output","and","target",".","Args",":","output","(","tensor",")",":","predictions","of","model","target","(","tensor",")",":","labels"]
code: def update(self, output=None, target=None):
      """
      Update the confusion matrice according to output and target.
  
      Args:
          output (tensor): predictions of model
          target (tensor): labels
      """
      output = output.detach().cpu().numpy()
      target = target.detach().cpu().numpy()
      output = to_prob(output)
  
      assert (
          output.ndim > target.ndim
      ), "Only multiclass classification is supported."
      for cls in range(self.num_classes):
          target_cls = (target == cls).astype(np.int8)
          for th in self.threshold:
              report = self._make_report(
                  output[:, cls, ...], target_cls, th
              )
              self._data[cls][th].fp += report.fp
              self._data[cls][th].tp += report.tp
              self._data[cls][th].fn += report.fn
  
imports: import dataclasses
  import math
  import warnings
  from collections import defaultdict
  import numpy
  import torch
  from sklearn.metrics import confusion_matrix, auc
  from baal.utils.array_utils import to_prob
label_desc: Use image node_id 3 for calling the PRAuC obj's underlying member method code with example usage: obj.update(output, target) without return types