Model Evaluation

Posted 付小同

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的主要内容,如果未能解决你的问题,请参考以下文章

MVC 3 Razor @model 与使用 @Model.pName 与 @Html.LabelFor(model => model.pName) 打印属性的模型

新 Backbone.Model() 与 Backbone.Model.extend()

MVC 5 视图中的@model 和 Model 是啥

show(Model $model) 在 Laravel 7 中不起作用

model和 modle一样吗?

Mongoose 聚合:基于 Model.associated_Model.associated_Model.field 过滤返回错误结果