当前位置:网站首页>Evaluation of classification model
Evaluation of classification model
2022-07-23 13:17:00 【weixin_ nine hundred and sixty-one million eight hundred and se】
Accuracy rate
- The most common use is accuracy , That is, the correct percentage of predicted results :estimator.score()
Accuracy (Precision) And recall rate (Recall)
Confusion matrix
- Under the classification task , Predicted results (Predicted Condition) With the right mark (True Condition) There are four different combinations , Make up the confusion matrix

Accuracy
- Accuracy ( Precision rate ): The predicted result is the proportion of real positive cases in positive samples
P = T P T P + F P P=\frac{TP}{TP+FP} P=TP+FPTP
Recall rate
- Recall rate ( Recall rate ): The proportion of real positive samples with positive prediction results
R = T P T P + F N R=\frac{TP}{TP+FN} R=TP+FNTP
The relationship between the two
- Precision and recall are contradictory variables . Generally speaking , When the accuracy is high , The recall rate is often low ; When the recall rate is high , Precision is often low .
P-R curve

- P-R The figure intuitively shows the recall rate of the learner in the sample population 、 Precision rate
- If a learner P-R The curve is completely changed by the curve of another learner “ encase ”, It can be asserted that the performance of the latter is better than the former
- If two learners P-R The curves intersect ,
- You can compare P-R The size of the area under the curve , To some extent, it represents the relative success of the learner in precision and recall “ Double high ” The proportion of .
- But this value is not easy to estimate , have access to “ Balance point ”(BEP) To measure , It is “ Precision rate = Incomplete rate ” The value of time , The higher one is better .
F1 Measure
- BEP Or too simplistic , More often F1 Measure :
F 1 = 2 × P × R P + R F1=\frac{2\times P\times R}{P+R} F1=P+R2×P×R
notes :F1 Measurement is based on the harmonic average of precision and recall :
1 F = 1 2 ( 1 P + 1 R ) \frac{1}{F}=\frac{1}{2}(\frac{1}{P}+\frac{1}{R}) F1=21(P1+R1)
- In some applications , The importance of precision and recall is different . For example, in the commodity recommendation system , In order to disturb users as little as possible , More hope that the recommended content is really what users are interested in , At this time, the accuracy is more important ; In the fugitive information retrieval system , More hope to miss as few fugitives as possible , At this point, recall is more important .F1 The general form of measurement —— F β F_{\beta} Fβ, Can let us express the accuracy / Different preferences for recall , It is defined as
F 1 = ( 1 + β ) 2 × P × R ( β 2 × P ) + R F1=\frac{(1+\beta)^2\times P\times R}{(\beta ^2 \times P)+R} F1=(β2×P)+R(1+β)2×P×R
β > 1 \beta>1 β>1 Time recall has a greater impact , β < 1 \beta<1 β<1 Time accuracy has a greater impact
ROC and AUC
- ROC The vertical axis of the curve is “ True case rate ”(TPR), TPR(True Positive Rate) It can be understood as all positive classes , How many are predicted to be positive classes ), The horizontal axis is " The false positive rate is "(FRP), FPR(False Positive Rate) It can be understood that in all anti classes , How many are predicted to be positive classes ( Positive class prediction error ) . The two are defined as
T P R = T P T P + F N F P R = F P F P + T N TPR=\frac{TP}{TP+FN}\qquad FPR=\frac{FP}{FP+TN} TPR=TP+FNTPFPR=FP+TNFP
- If a learner ROC The curve is completely changed by the curve of another learner “ encase ”, It can be asserted that the performance of the latter is better than the former
- If two learners P-R The curves intersect , Compare ROC The area under the curve , namely AUC.
边栏推荐
- 倍福PLC和C#通过ADS通信传输int数组类型变量
- 转行软件测试有学历要求吗?低于大专是真的没出路吗?
- 虚拟内存技术的来龙去脉(上)
- Pod topology constraints
- Common CMD commands to quickly open programs
- Desensitize data
- The relationship between method area, perpetual generation and meta space
- Uncaught (in promise) Neo4jError: WebSocket connection failure. Due to security constraints in your
- C language - big end storage and small end storage
- 如何防止订单重复支付?
猜你喜欢
随机推荐
In the Internet era, how to refine user operations?
【JZOF】07 重建二叉树
Convert the specified seconds to minutes and seconds
信号完整性(SI)电源完整性(PI)学习笔记(三十二)电源分配网路(四)
雷达导论专栏总目录
Record a reptile question bank
虚拟内存技术的来龙去脉(上)
当输入网址后,到网页显示,期间发生了什么
静态路由的搭建
Complex networks - common drawing software and libraries
Functional testing to automated testing, sharing ten years of automated testing experience
从List<Map>中截取指定的范围数据集合
北大博士小姐姐:分享压箱底干货 | 五招提高学习效率
CAN控制器的位同步过程
倍福PLC和C#通过ADS通信传输int数组类型变量
信號完整性(SI)電源完整性(PI)學習筆記(三十二)電源分配網路(四)
Opencv image processing (Part 2): edge detection + template matching + Hough transform
High voltage MOS tube knx42150 1500v/3a is applied to frequency converter power supply inverter, etc
4D天线阵列布局设计
根据不同时间统计不同类型的数据(存储过程)

![[actf2020 freshman competition]backupfile 1](/img/4c/cefb3660a176fee7fde6b0e38e6f4b.png)






