docs: def perplexity(eval_data, predictions, scores, learner='ignored'):
      '''
      Return the perplexity `exp(-score)` computed from each score in `scores`.
      The log scores in `scores` should be base e (`exp`, `log`).
  
      The correct average to use for this metric is the geometric mean. It is
      recommended to work in log space to calcuate this mean (or use
      `scipy.stats.mstats.gmean`):
  
          mean_perplexity = np.exp(np.log(perplexities).mean())
  
      >>> perplexities = perplexity(None, None, [np.log(0.5), np.log(0.1), np.log(0.25)])
      >>> [round(p) for p in perplexities]
      [2.0, 10.0, 4.0]
      '''
      return np.exp(-np.array(scores)).tolist()