code: def precision(y, yhat, positive=True):
      """Returns the precision (higher is better).
  
      :param y: true function values
      :param yhat: predicted function values
      :param positive: the positive label
  
      :returns: number of true positive predictions / number of positive predictions
  
      """
      table = contingency_table(y, yhat, positive)
      return _precision(table)
  
imports: import math
  import operator
label_desc: Use image node_id 15 for calling a global function with example usage: precision(y, yhat, positive) and returns: _precision