ezoic

Saturday, March 7, 2020

Things about classification AUC, ROC, recall, precision, sensitivity, specificity and F1

Classification methods predict the probability of the values of  a categorical  responsible variable  given some predictors.

There are a lot of classification methods. logistic, support vector machine, random forest

In R, there is a package called caret , classification and regression training . There are a lot of built-in classification methods :

https://rdrr.io/cran/caret/man/models.html

To measure the effectiveness of a classification method, there are some metrics :

AUC, ROC, recall, precision, sensitivity, specificity and F1

1.  ROC and AUC

A receiver operating characteristic curve or ROC curve, is a graphical plot that illustrates the diagnostic ability of binary classifier system as its discrimination threshold is varied.

The ROC curve is created by plotting the true positive rate against the false positive rate at various threshold settings. True positive rate is also known as sensitivity, recall or probability of detection. The false positive rate is also known as probability of false alarm, and can be calculated as (1-specificity).  It can also be thought of as a plot of the power as a function of the Type I Error of the decision rule.

AUC means area under the ROC curve. It is a value between 0 and 1.  The closer AUC is to 1, the more accurate the classification prediction is.


2. Recall, precision , sensitivity , specificity , F1





The values are from confusion matrix

precision=true positive/(true positive + false positive)

recall ( sensitivity) =true positive /(true positive + false negative)

specificity =true negative /(true negative + false positive)

F1 Score = 2*(Recall * Precision) / (Recall + Precision)

High recall and high precision show that the classifier is returning accurate  results ( high precision ) , as well as returning a majority of all positive results ( high recall).

specificity is the true negative rate. high specificity means that the classifier is retuning a majority of all negative results.








No comments:

Post a Comment

looking for a man

 I am a mid aged woman. I live in southern california.  I was born in 1980. I do not have any kid. no compliacted dating.  I am looking for ...