docstr: `numerator`, `denominator` and `weight` are three variables chosen to be abstract
  representatives of the ones that are measured for cases with different `average` parameters.
  `weight` is only used when `average='weighted'`. Actual value of these three variables is
  as follows.
  
  average='samples':
    numerator (torch.Tensor): sum of metric value for samples
    denominator (int): number of samples
  
  average='weighted':
    numerator (torch.Tensor): number of true positives per class/label
    denominator (torch.Tensor): number of predicted(for precision) or actual(for recall) positives per
      class/label.
    weight (torch.Tensor): number of actual positives per class
  
  average='micro':
    numerator (torch.Tensor): sum of number of true positives for classes/labels
    denominator (torch.Tensor): sum of number of predicted(for precision) or actual(for recall) positives for
      classes/labels.
  
  average='macro' or boolean or None:
    numerator (torch.Tensor): number of true positives per class/label
    denominator (torch.Tensor): number of predicted(for precision) or actual(for recall) positives per
      class/label.
docstr_tok: ["`","numerator","`",",","`","denominator","`","and","`","weight","`","are","three","variables","chosen","to","be","abstract","representatives","of","the","ones","that","are","measured","for","cases","with","different","`","average","`","parameters",".","`","weight","`","is","only","used","when","`","average='weighted","'","`",".","Actual","value","of","these","three","variables","is","as","follows",".","average='samples","'",":","numerator","(","torch.Tensor",")",":","sum","of","metric","value","for","samples","denominator","(","int",")",":","number","of","samples","average='weighted","'",":","numerator","(","torch.Tensor",")",":","number","of","true","positives","per","class\/label","denominator","(","torch.Tensor",")",":","number","of","predicted","(","for","precision",")","or","actual","(","for","recall",")","positives","per","class\/label",".","weight","(","torch.Tensor",")",":","number","of","actual","positives","per","class","average='micro","'",":","numerator","(","torch.Tensor",")",":","sum","of","number","of","true","positives","for","classes\/labels","denominator","(","torch.Tensor",")",":","sum","of","number","of","predicted","(","for","precision",")","or","actual","(","for","recall",")","positives","for","classes\/labels",".","average='macro","'","or","boolean","or","None",":","numerator","(","torch.Tensor",")",":","number","of","true","positives","per","class\/label","denominator","(","torch.Tensor",")",":","number","of","predicted","(","for","precision",")","or","actual","(","for","recall",")","positives","per","class\/label","."]
code: def reset(self) -> None:
      """
      `numerator`, `denominator` and `weight` are three variables chosen to be abstract
      representatives of the ones that are measured for cases with different `average` parameters.
      `weight` is only used when `average='weighted'`. Actual value of these three variables is
      as follows.
  
      average='samples':
        numerator (torch.Tensor): sum of metric value for samples
        denominator (int): number of samples
  
      average='weighted':
        numerator (torch.Tensor): number of true positives per class/label
        denominator (torch.Tensor): number of predicted(for precision) or actual(for recall) positives per
          class/label.
        weight (torch.Tensor): number of actual positives per class
  
      average='micro':
        numerator (torch.Tensor): sum of number of true positives for classes/labels
        denominator (torch.Tensor): sum of number of predicted(for precision) or actual(for recall) positives for
          classes/labels.
  
      average='macro' or boolean or None:
        numerator (torch.Tensor): number of true positives per class/label
        denominator (torch.Tensor): number of predicted(for precision) or actual(for recall) positives per
          class/label.
      """
  
      self._numerator: Union[int, torch.Tensor] = 0
      self._denominator: Union[int, torch.Tensor] = 0
      self._weight: Union[int, torch.Tensor] = 0
      self._updated = False
  
      super(_BasePrecisionRecall, self).reset()
  
file_path: ignite/ignite/metrics/precision.py
imports: import warnings
  from typing import Callable, cast, Optional, Sequence, Union
  import torch
  import ignite.distributed
  from ignite.exceptions import NotComputableError
  from ignite.metrics.accuracy import _BaseClassification
  from ignite.metrics.metric import reinit__is_reduced, sync_all_reduce
  from ignite.utils import to_onehot
label_desc: Use image node_id 4 for calling the _BasePrecisionRecall obj's underlying member method code with example usage: obj.reset() without return types