根据 F1 分数(在阈值 = 0.5 时计算)选择模型是否等同于根据精确召回曲线下的面积选择模型?

Is Choosing a Model based on F1 Score (Computed at threshold = 0.5) equivalent to choosing a model based on Area Under Precision Recall Curve?

https://neptune.ai/blog/f1-score-accuracy-roc-auc-pr-auc 提供了关于 Accuracy vs AUROC vs F1 vs AUPR 的一个很好的总结。

在同一数据集上比较不同模型的性能时,根据用例,可能会选择准确性、AUROC、AUPR 或 F1。

有一件事我不是很清楚:"does choosing based on F1 (harmonic mean between precision and recall) over a threshold of 0.5 result in the same choice compared to choosing based on Area Under PR Curve?"

如果是,为什么?

肯定不是,因为一个非常简单和根本的原因:AUC 分数(ROC 或 PR 曲线)实际上给出了模型的性能在整个阈值范围内平均;仔细查看链接文档,您会注意到以下有关 PR AUC 的内容(原文中强调):

You can also think of PR AUC as the average of precision scores calculated for each recall threshold. You can also adjust this definition to suit your business needs by choosing/clipping recall thresholds if needed.

你可以使用 PR AUC

when you want to choose the threshold that fits the business problem

当您选择任何特定阈值(准确率、召回率、F1 等)时,您已经完全离开了 AUC 分数(ROC 或 PR)的范围 - 您处于曲线上的一个点,并且曲线下的平均面积不再有用(甚至有意义)。

我知道 为什么 AUC 分数会产生误导,因为大多数人认为他们给出的东西与他们实际给出的东西不同,即模型在整个阈值范围内的性能,而要部署的东西(因此对其性能感兴趣)必然涉及特定的阈值。