首页 > 代码库 > Model Evaluation
Model Evaluation
1. Confusion Matrix
Fact\Predict | Class A | Class B |
Class A | True Positive | False Negative |
Class B | False Positive | True Nagative |
A confusion table for Class A
Positive/ Negative: if target class is A, then the predict A is Positve, Others are negative.
True (P/N): if Predict = Fact, then it‘s True.
2. Measures based on Confusion Matrix
a. Accuracy = TN+TP/ALL
comments: not good measure when data are unbalanced.
b. True Positive Rate/ recall/ sensitivity = TP / TP + FN
comments: use it when Positive results are important
c. True Negative Rate = TN / TN + FP
R for Confusion Matrix:
library(SDMTools)
confusion.matrix(svmmodel.truth,svmmodel.class)
3. ROC curve (bio-classification)
y: sensitivity
x: specificity
The bigger the Area of ROC is, the more accurate the model is.
Model Evaluation
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。