简体   繁体   English

如何使用SVM找到精度,召回,准确度?

[英]How to find the Precision, Recall, Accuracy using SVM?

Duplicate calculating Precision, Recall and F Score 重复计算精度,召回和F分数

I have a input file with text description and classified level (ielevelA and levelB). 我有一个带文本描述和分类级别的输入文件(ielevelA和levelB)。 I want to write a SVM classifier that measure precision, recall and accuracy. 我想编写一个测量精度,召回率和准确度的SVM分类器。 I looked at scikit and LIBSVM but I want to know more step by step. 我看了scikitLIBSVM,但我想逐步了解更多。

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. Precision = TP / (TP+FP) 精度= TP /(TP + FP)
  2. Recall = TP / (TP+FN) 召回= TP /(TP + FN)
  3. Accuracy = (TP + TN) / (TP + TN + FP + FN) 精度=(TP + TN)/(TP + TN + FP + FN)

With TP, FP, TN, FN being number of true positives, false positives, true negatives and false negatives, respectively. 对于TP,FP,TN,FN分别是真阳性,假阳性,真阴性和假阴性的数量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用精度和召回值获得混淆矩阵和准确率? - how to get confusion matrix and the accuracy rate using precision and recall values? 作为精确度和召回率函数的准确度 - accuracy as a function of precision and recall 如何在高度不平衡数据集的 svm 中提高精度和召回率 - how to increase precision as well as recall in svm for highly imbalanced data set 召回后的分类精度和精度 - Classification accuracy after recall and precision 如何在Tensorflow中获得精度和召回率而不是准确性 - How can i get precision & recall instead of accuracy in Tensorflow 如何使用混淆矩阵计算精度和召回率 - How to calculate precision and recall using Confusion Matrix 多类模型的准确度、精确度和召回率 - Accuracy, precision, and recall for multi-class model 如何解释几乎完美的准确性和AUC-ROC但零f1分数,精确度和召回率 - How to interpret almost perfect accuracy and AUC-ROC but zero f1-score, precision and recall 如何使用 scikit learn 计算多类案例的准确率、召回率、准确率和 f1 分数? - How to compute precision, recall, accuracy and f1-score for the multiclass case with scikit learn? 如何通过Spark ml lib中的交叉验证获得准确性,召回率和ROC? - How to get accuracy precision, recall and ROC from cross validation in Spark ml lib?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM