0% found this document useful (0 votes)
8 views

Logistic Regression

Uploaded by

baswalganesh1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Logistic Regression

Uploaded by

baswalganesh1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Confusion Matrix

• Given a dataset of P positive instances and N negative instances:

Predicted Class
Yes No
The notion of a

Actual Class
confusion matrix can Yes TP FN
be usefully extended
to the multiclass case No FP TN
(i,j) cell indicate how
many of the i-labeled • Imagine using classifier to identify positive cases (i.e., for
examples were information retrieval)
predicted to be j

Probability that a randomly Probability that a randomly


selected positive prediction selected positive is
is indeed positive identified

Also called Sensitivity


Accuracy: (TP + TN) / (TP + TN + FP + FN)

Precision: TP / (TP + FP)

Recall (Sensitivity): TP / (TP + FN)

Specificity: TN / (TN + FP)

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


In sklearn:

TN FP

FN TP

You might also like