statsmodels
library
Actual | |||||
1 | 0 | ||||
Predicted | 1 |
|
|
||
0 |
|
|
Actual | |||||
1 | 0 | ||||
Predicted | 1 | 500 - |
24 - |
||
0 | 19 - |
687 - |
Actual | |||||
A | B | C | D | ||
Predicted | A | 20 | 1 | 2 | 3 |
B | 4 | 21 | 5 | 6 | |
C | 7 | 8 | 22 | 9 | |
D | 10 | 11 | 12 | 23 |
Actual | |||||
A | B | C | D | ||
Predicted | A |
|
|
|
|
B |
|
|
|||
C | |||||
D |
Actual | |||||
A | Not A | ||||
Predicted | A |
|
|
||
Not A |
|
|
Actual | |||||
A | B | C | D | ||
Predicted | A |
|
|
|
|
B |
|
|
|||
C | |||||
D |
Actual | |||||
B | Not B | ||||
Predicted | B |
|
|
||
Not B |
|
|
Actual | |||||
A | B | C | D | ||
Predicted | A |
|
|
|
|
B |
|
|
|||
C | |||||
D |
Actual | |||||
C | Not C | ||||
Predicted | C |
|
|
||
Not C |
|
|
Actual | |||||
A | B | C | D | ||
Predicted | A |
|
|
|
|
B |
|
|
|||
C | |||||
D |
Actual | |||||
D | Not D | ||||
Predicted | D |
|
|
||
Not D |
|
|
sklearn.metrics.confusion_matrix
sklearn.metrics.multilabel_confusion_matrix
Accuracy
(ACC)
True Positive Rate
(TPR), Recall, Sensitivity |
$$ TPR = \dfrac{\sum{\color{green}{TP}}}{\sum{\color{purple}{CP}}} $$ | False Positive Rate (FPR) | \begin{equation} FPR = \dfrac{\sum{\color{blue}{FP}}}{\sum{\color{brown}{CN}}}\end{equation} |
False Negative Rate (FNR) | $$ FNR = \dfrac{\sum{\color{red}{FN}}}{\sum{\color{purple}{CP}}} $$ |
Specificity
(SPC), Selectivity, True Negative Rate (TNR) |
\begin{equation} TNR = \dfrac{\sum{\color{pink}{TN}}}{\sum{\color{brown}{CN}}}\end{equation} |
Positive predictive value (PPV) Precision | $$ PPV = \dfrac{\sum{\color{green}{TP}}}{\sum{\color{orange}{PP}}} $$ | False discovery rate (FDR) | $$ FDR = \dfrac{\sum{\color{blue}{FP}}}{\sum{\color{orange}{PP}}} $$ |
False omission rate (FOR) | $$ FOR = \dfrac{\sum{\color{red}{FN}}}{\sum{\color{yellow}{PN}}} $$ | Negative predictive value (NPV) | $$ NPV = \dfrac{\sum{\color{pink}{FN}}}{\sum{\color{yellow}{PN}}} $$ |
sklearn.metrics.precision_score
sklearn.metrics.recall_score
sklearn.metrics.f1_score
sklearn.metrics.multilabel_confusion_matrix
sklearn.metrics.precision_recall_fscore_support
sklearn.metrics.matthews_corrcoef
sklearn.metrics.hamming_loss
sklearn.metrics.mutual_info_score