class_docstr: Precision metric.
docstr: :class:`PrecisionMetric` constructor.
  
  :param k: Number of results to consider.
  :param threshold: the label threshold of relevance degree.
docstr_tok: [":","class",":","`","PrecisionMetric","`","constructor",".",":","param","k",":","Number","of","results","to","consider",".",":","param","threshold",":","the","label","threshold","of","relevance","degree","."]
code: def __init__(self, k: int = 1, threshold: float = 0.0):
      """
      :class:`PrecisionMetric` constructor.
  
      :param k: Number of results to consider.
      :param threshold: the label threshold of relevance degree.
      """
      self._k = k
      self._threshold = threshold
  
imports: import numpy
  from matchzoo.engine.base_metric import BaseMetric, sort_and_couple
label_desc: Use image node_id 1 to create a new Precision object from inherited base classes: BaseMetric with example: obj = Precision(k, threshold)