parameters: (refrxn, refeq, rrat, m=0.03, p=10.0)
return_statement: return mask, weight
docstring: :param refrxn:
      :param refeq:
      :param rrat:
      :param m: minimum permitted weight for a point
      :param p: multiples of abs(refeq) above refeq to which zero-line in head is displaced
      :return:
docstring_summary: :param refrxn:
      :param refeq:
      :param rrat:
      :param m: minimum permitted weight for a point
      :param p: multiples of abs(refeq) above refeq to which zero-line in head is displaced
      :return:
docstring_tokens: : param refrxn : : param refeq : : param rrat : : param m : minimum permitted weight for a point : param p : multiples of abs ( refeq ) above refeq to which zero - line in head is displaced : return :
function: def balanced_error(refrxn, refeq, rrat, m=0.03, p=10.0):
      """
      :param refrxn:
      :param refeq:
      :param rrat:
      :param m: minimum permitted weight for a point
      :param p: multiples of abs(refeq) above refeq to which zero-line in head is displaced
      :return:
  
      """
      one = float(1)
      q = one if rrat >= one else p
      qm1perat = q - 1 + refrxn / refeq
      weight = max(m, qm1perat / q)
      mask = weight * q / abs(qm1perat)
      return mask, weight
function_tokens: def balanced_error ( refrxn , refeq , rrat , m = 0.03 , p = 10.0 ) : one = float ( 1 ) q = one if rrat >= one else p qm1perat = q - 1 + refrxn / refeq weight = max ( m , qm1perat / q ) mask = weight * q / abs ( qm1perat ) return mask , weight