혼동행렬 관련 분류 성능 값

2024. 7. 2. 23:42DATA/BIGDATA

반응형

 

 

 

 

Confusion Matrix

 

Actual / Predicted | Negative | Positive |
-------------------|----------|----------|
Negative           |    8     |    3     |
Positive           |    2     |    7     |
			Predicted Negative	Predicted Positive
Actual Negative (0)	True Negative (TN)	False Positive (FP)
Actual Positive (1)	False Negative (FN)	True Positive (TP)

 

 

 

 

  • True Negative (TN): 실제 Negative를 Negative로 정확하게 예측한 경우
  • False Positive (FP): 실제 Negative를 Positive로 잘못 예측한 경우 (예측이 잘못된 경우)
  • False Negative (FN): 실제 Positive를 Negative로 잘못 예측한 경우 (예측이 잘못된 경우)
  • True Positive (TP): 실제 Positive를 Positive로 정확하게 예측한 경우

 

 

 

 

분류 성능 값

1. 정확도 (Accuracy):
   - 정의: 전체 데이터 중에서 정확하게 분류된 비율이다.
   - 공식: \(\frac{\text{True Positives} + \text{True Negatives}}{\text{Total}}\)
   - 정답: \(\frac{15}{20} = 0.75\)

2. 민감도 (Sensitivity) = 재현율 (Recall) = TPR (True Positive Rate):
   - 정의: 실제 Positive 중에서 정확하게 분류된 비율이다.
   - 공식: \(\frac{\text{True Positives}}{\text{True Positives} + \text{False Negatives}}\)
   - 정답: \(\frac{7}{9} \approx 0.7778\)

3. 특이도 (Specificity):
   - 정의: 실제 Negative 중에서 정확하게 분류된 비율이다.
   - 공식: \(\frac{\text{True Negatives}}{\text{True Negatives} + \text{False Positives}}\)
   - 정답: \(\frac{8}{11} \approx 0.7273\)

4. 정밀도 (Precision) = PPV (Positive Predictive Value):
   - 정의: 예측한 Positive 중에서 실제로 Positive인 비율이다.
   - 공식: \(\frac{\text{True Positives}}{\text{True Positives} + \text{False Positives}}\)
   - 정답: \(\frac{7}{10} = 0.7\)

5. F1 Score:
   - 정의: 정밀도와 재현율의 조화 평균이다. 정밀도와 재현율이 모두 높을수록 높은 값을 가진다.
   - 공식: \(2 \times \frac{\text{Precision} \times \text{Recall}}{\text{Precision} + \text{Recall}}\)
   - 정답: \(2 \times \frac{0.7 \times 0.7778}{0.7 + 0.7778} \approx 0.737\)

 

반응형

'DATA > BIGDATA' 카테고리의 다른 글

분류 분석  (0) 2024.07.03
NORM.INV  (0) 2024.07.02
선형 회귀(Linear Regression)의 기본 공식  (0) 2024.07.01
파이썬 데이터 라이브러리 관련  (0) 2024.06.27
SSR SSE  (0) 2024.06.14