码迷,mamicode.com
首页 > 其他好文 > 详细

Model Evaluation

时间:2017-07-16 12:40:19      阅读:111      评论:0      收藏:0      [点我收藏+]

标签:order   important   pre   str   class   als   oat   bio   conf   

 

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

标签:order   important   pre   str   class   als   oat   bio   conf   

原文地址:http://www.cnblogs.com/fuxiaotong/p/7189975.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!