Performance matrics
- Confusion matrix
- Accuracy
- Precision, Recall
- F1-score
- TPR, FPR
- ROC curve
- imbalanced dataset
Confusion matrix
Accuracy
- (TP+TN)/(TP+TN+FP+FN)
Precision, Recall
- Precision: TP/(TP+FP)
- Recall: (TP)/(TP+FN)
F1-score
- 2 * (precision*recall)/(precision+recall)
TPR, FPR
- TPR = (TP)/(TP+FN) = Recall
- FPR = (FP)/(FP+TN)
ROC curve
imbalanced dataset
1. negative class(0) > positive class(1)
help | don't help |
|
|
2. negative class(0) < positive class(1)
help | don't help |
|
|
요약
- negative class(0) > positive class(1) 이고 negative에 포커스일 때 AUC score 사용
- negative class(0) < positive class(1) 이고 positive에 포커스일 때 Precision, Recall, F1-score 사용
- Accuracy score는 imbalanced dataset에서 크게 도움이 되지 못함
예제
http://ethen8181.github.io/machine-learning/model_selection/imbalanced/imbalanced_metrics.html
ref :
http://ethen8181.github.io/machine-learning/model_selection/imbalanced/imbalanced_metrics.html