机器学习中分类结果混淆矩阵_机器学习中的混淆矩阵

本文介绍了机器学习中用于评估分类模型性能的重要工具——混淆矩阵。混淆矩阵详细展示了模型预测结果与真实结果之间的对应关系,帮助分析模型的正确预测与错误预测情况。
摘要由CSDN通过智能技术生成

机器学习中分类结果混淆矩阵

In this blog, I will try to explain all the basic terminologies of the confusion matrix and how to calculate them, with an example.

在这个博客中,我将尝试通过一个例子来解释混淆矩阵的所有基本术语以及如何计算它们。

We use the confusion matrix to evaluate the performance of a classification model. In this example, we are using a classifier to predict whether it is a dog or a cat. My main aim is to make you understand the intuition behind the terminologies.

我们使用混淆矩阵来评估分类模型的性能。 在此示例中,我们使用分类器预测它是狗还是猫。 我的主要目的是使您理解术语背后的直觉。

TRUE POSITIVE (TP): Prediction is a dog and actually a dog.

积极(TP):预测是一只狗,实际上是一只狗。

TRUE NEGATIVE (TN): Prediction is a cat and actually a cat.

真负(TN):预测是猫,实际上是猫。

FALSE POSITIVE (FP): Prediction is a dog and actually a cat. Also known as “TYPE I ERROR”.

假阳性(FP):预测是狗,实际上是猫。 也称为“ TYPE I ERROR ”。

FALSE NEGATIVE (FN): Prediction is a cat and actually a dog. Also known as “TYPE II ERROR”.

假阴性(FN):预测是猫,实际上是狗。 也称为“ TYPE II ERROR ”。

TRUE POSITIVE RATE (TPR) / RECALL / SENSITIVITY / HIT RATE

真实正利率(TPR)/召回率/灵敏度/命中率

When it is actually a dog, how many times our classifier predicts it as a dog. Rate of correctly predicting dogs.

当它实际上是一只狗时,我们的分类器将其预测为狗的次数。 正确预测狗的比率。

Image for post

TRUE NEGATIVE RATE (TNR) / SPECIFICITY / SELECTIVITY

真负速率(TNR)/比值/选择性

When it is actually a cat, how many times our classifier predicts it as a cat. Rate of correctly predicting cats.

当它实际上是猫时,我们的分类器将其预测为猫的次数。 正确预测猫的比率。

Image for post

FALSE POSITIVE RATE (FPR) / FALL-OUT

假正利率(FPR)/跌落

When it is actually a cat, how many times our classifier predicts it as a dog.

当它实际上是猫时,我们的分类器将其预测为狗的次数。

Image for post

FALSE NEGATIVE RATE (FNR) / MISS RATE

假负利率(FNR)/误汇率

When it is actually a dog, how many times our classifier predicts it as a cat.

当它实际上是一只狗时,我们的分类器将其预测为猫的次数。

Image for post

POSITIVE PREDICTIVE VALUE (PPV) / PRECISION

阳性预测值(PPV)/精度

When our classifier predict dog, how many times it is correct?

当我们的分类器预测狗时,正确的次数是多少?

Image for post

NEGATIVE PREDICTIVE VALUE (NPV)

负预测值(NPV)

When our classifier predict cat, how many times it is correct?

当我们的分类器预测猫时,它是多少次正确?

Image for post

ACCURACY

准确性

How often our classifier predicts correctly?

分类器正确预测的频率是多少?

Image for post

MISCLASSIFICATION RATE / ERROR RATE

错误分类率/错误率

How often our classifier predicts incorrectly?

分类器预测错误的频率有多高?

Image for post

F1-SCORE

F1-分数

We cannot compare precision and recall together so to make it comparable we take the weighted average of precision and recall.

我们无法将精度和召回率同时进行比较,因此为了使其具有可比性,我们采用了精度和召回率的加权平均值。

F1-Score is the harmonic mean of precision and recall and is crucial when the false negative and false positive are important in our classifier, it also shows a better measure in case of imbalance classes.

F1-Score是精度和召回率的谐波平均值,在假阴性和假阳性在我们的分类器中很重要时至关重要,它在不平衡类的情况下也显示出更好的度量。

Image for post

PREVALENCE

患病率

How often does the dog actually occur in our sample?

在我们的样本中,狗实际上多久出现一次?

Image for post

I hope you got some basic idea of what exactly is confusion matrix. If this post helped you please consider giving an👏🏼to motivate me.

我希望您对什么是混淆矩阵有一些基本的了解。 如果这篇文章对您有帮助,请考虑给我一个激励。

翻译自: https://medium.com/swlh/confusion-matrix-in-machine-learning-920eda3d2cb6

机器学习中分类结果混淆矩阵

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值