docs: def plot_precision_recall_curve(y_true, scores, save_to,
                                  distances=False, dpi=150):
      """Precision/recall curve
  
      This function will create (and overwrite) the following files:
          - {save_to}.precision_recall.png
          - {save_to}.precision_recall.eps
          - {save_to}.precision_recall.txt
  
      Parameters
      ----------
      y_true : (n_samples, ) array-like
          Boolean reference.
      scores : (n_samples, ) array-like
          Predicted score.
      save_to : str
          Files path prefix.
      distances : boolean, optional
          When True, indicate that `scores` are actually `distances`
      dpi : int, optional
          Resolution of .png file. Defaults to 150.
  
      Returns
      -------
      auc : float
          Area under precision/recall curve
      """
  
  
      precision, recall, thresholds, auc = precision_recall_curve(
          y_true, scores, distances=distances)
  
      # plot P/R curve
      plt.figure(figsize=(12, 12))
      plt.plot(recall, precision, 'b')
      plt.xlabel('Recall')
      plt.ylabel('Precision')
      plt.xlim(0, 1)
      plt.ylim(0, 1)
      plt.tight_layout()
      plt.savefig(save_to + '.precision_recall.png', dpi=dpi)
      plt.savefig(save_to + '.precision_recall.eps')
      plt.close()
  
      # save P/R curve in text file
      txt = save_to + '.precision_recall.txt'
      line = '{t:.6f} {p:.6f} {r:.6f}\n'
      with open(txt, 'w') as f:
          for i, (t, p, r) in enumerate(zip(thresholds, precision, recall)):
              f.write(line.format(t=t, p=p, r=r))
  
      return auc