uqlm.utils.plots.plot_ranked_auc#

uqlm.utils.plots.plot_ranked_auc(uq_result, correct_indicators, scorers_names=None, write_path=None, title='Hallucination Detection: Scorer-specific AUROC', fontsize=10, fontname=None, metric_type='auroc', baseline=0.5)#

Plot the ranked bar plot for hallucination detection AUROC/AUPRC of the given scorers.

Parameters:
  • uq_result (UQResult) – The UQResult object to plot

  • correct_indicators (ArrayLike) – The correct indicators of the responses

  • scorers_names (List[str], default=None) – The names of the scorers to plot

  • title (str, default="Hallucination Detection: Scorer-specific AUROC") – The title of the plot. Adjusted based on the metric type

  • write_path (Optional[str], default=None) – The path to save the plot

  • fontsize (int, default=10) – The font size of the plot

  • fontname (str, default=None) – The font name of the plot

  • metric_type (str, default="auroc") – Type of metric(s) to compute and plot: - “auroc”: Plot only AUROC scores (Area Under ROC Curve) - “auprc”: Plot only AUPRC scores (Area Under Precision-Recall Curve) - “both”: Plot both AUROC and AUPRC side by side in subplots

  • baseline (float, default=0.5) – The baseline value to show as a dotted line (typically 0.5 for AUROC)

Return type:

None