美文网首页机器学习与数据挖掘
评价分类器的好坏的几种方法 Precision Recall F

评价分类器的好坏的几种方法 Precision Recall F

作者: 环境与方法 | 来源:发表于2017-10-09 02:48 被阅读149次

准确率和召回率应用于信息检索InformationRetrieval和文本分类TextClassification

如果我们将一个样本集进行分类,那么结果将会有四种情况:

                                    Classified Positive            Classified Negative

Actual Positive                    TP                                      FN

Actual Negative                   FP                                      TN

where: TP True Positive

               FP False Positive

              FN False Negative

              TN True Negative 

上述表格被称为Confusion Matrix

接下来我们引入三个指标对分类进行评价:

1. 准确率Precision:表示的是预测为正的样本中有多少是真正的正样本。衡量的是检索系统的查准率。P is the number of correctly classified positive examples divided by the total number of examples that are classified as positive. 

2. 召回率Recall: 表示的是样本的正例中有多少被预测正确了。衡量的是检索系统的查全率。r is the number of correctly classified positive examples divided by the total number of actual positive examples in the test set.

3. F1-Score: 准确率和召回率的综合指标。F1-Score combines precision and recall into one measure.

计算公式如下:

有时考虑到不同的需求,准确率和召回率有不同的权重,我们可以引入F2-Score和F0.5-Score.

接下来是ROC曲线Receive Operating Characteristic Curve和AUC面积Area Under Curve

对于一个混淆矩阵,我们可以计算两个指标,TPR召回率和FPR:

ROC曲线就是以FPR为x轴,TPR为y轴画图得到。

AUC的值是ROC曲线下的面积,面积越大,表示模型分类越精确。 一般分类器的AUC值在0.5到1之间,0.5表示区分能力和随机猜测没有区别,1表示模型完美精准。

同时与F1-Score相对应的有G-Mean,是在统计学科中的评价指标:

1. Sensitivity灵敏度: Same as TPR

2. specificity特异度: also called True Negative RateTNR.  TNR = TN / (TN + FP)

FPR = 1 - Specificity

相关文章

网友评论

    本文标题:评价分类器的好坏的几种方法 Precision Recall F

    本文链接:https://www.haomeiwen.com/subject/pjuqyxtx.html