code: def fbeta(y, yhat, beta, positive=True):
      """Returns the :math:`F_\\beta`-score.
  
      :param y: true function values
      :param yhat: predicted function values
      :param beta: the value for beta to be used
      :type beta: float (positive)
      :param positive: the positive label
  
      :returns:
          .. math:: (1 + \\beta^2)\\frac{cdot precision\\cdot recall}{(\\beta^2 * precision)+recall}
  
      """
      bsq = beta**2
      TP, FP, _, FN = contingency_table(y, yhat, positive)
  
      if TP == 0 and FP == 0 and FN == 0:
          fbeta = 0.0
      else:
          fbeta = float(1 + bsq) * TP / ((1 + bsq) * TP + bsq * FN + FP)
      return fbeta
  
imports: import math
  import operator
label_desc: Use image node_id 14 for calling a global function with example usage: fbeta(y, yhat, beta, positive) and returns: fbeta