code: def _auc(actual, pred_ranks):
      n_pos = np.sum(actual)
      n_neg = len(actual) - n_pos
      return (
          np.sum(pred_ranks[actual == 1]) - n_pos * (n_pos + 1) / 2
      ) / (n_pos * n_neg)
  
file_path: BigDL/python/friesian/example/deep_fm/evaluation.py
imports: from collections import defaultdict
  import logging
  import numpy
  from numba import njit
  from scipy.stats import rankdata
label_desc: Use image node_id 1 for calling a global function with example usage: _auc(actual, pred_ranks) and returns: unknown