如何使用SVM查找精度,召回率和准确性? [英] How to find the Precision, Recall, Accuracy using SVM?

查看:597
本文介绍了如何使用SVM查找精度,召回率和准确性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重复计算精度,召回率和F得分

我有一个带有文本描述和分类级别(即levelA和levelB)的输入文件.我想编写一个可测量精度,召回率和准确性的SVM分类器.我看了 scikit LIBSVM ,但我想逐步了解更多信息.

I have a input file with text description and classified level (i.e.levelA and levelB). I want to write a SVM classifier that measure precision, recall and accuracy. I looked at scikit and LIBSVM but I want to know more step by step.

任何示例代码或基本教程都将非常不错.感谢您提前提出任何建议.

Any sample code or basic tutorial would be really nice. Thanks for any suggestion in advance.

推荐答案

这些性能指标很容易从预测标签和真实标签中获取,作为后期处理步骤:

These performance measures are easy to obtain from the predicted labels and true labels, as a post-processing step:

  1. 精度= TP/(TP + FP)
  2. 召回= TP/(TP + FN)
  3. 精度=(TP + TN)/(TP + TN + FP + FN)

其中TP,FP,TN和FN分别为真阳性,假阳性,真阴性和假阴性的数量.

With TP, FP, TN, FN being number of true positives, false positives, true negatives and false negatives, respectively.

这篇关于如何使用SVM查找精度,召回率和准确性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆