codestates / codestates/ds-TIL
[TIL] 김민채_201021
- Dominant language
- No language data
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
### Today I Learn_33
**1. evaluation measures : the confusion matrix, precision, recall, thresholds, ROC**
- 머신러닝 모델은 TP(True Positive)을 최대한 높이는 것을 목적으로 둔다.
- 모델 성능 평가는 보통 accuracy score을 사용하지만 정확하게 예측한 것의 확률이기에,
관심 없는 TN(True Negative)까지 계산되어 TN이 TP보다 더 많을 경우 TP의 정확도와 달라진다.
즉 실제와 달리 정확도가 떨어짐에도 성능 평가에서는 높은 값을 가진다.
- accuracy score의 보완책 -> precision, recall, thresholds, ROC, f1_score
- precision은 정밀도이다. 모델의 예측값이 기준.
- recall은 재현율이다. data의 실제값이 기준이다.
- 세세한 분류를 요하는 경우엔 precision이 높은 모델을 만들고
- 실제는 true이지만 모델 예측값이 틀려 치명타가 되는 경우엔 recall이 높은 모델을 사용한다.
- thresholds를 조정해서 precision과 recall 값을 바꿀 수 있다.
- thresholds가 높으면 target이 1인 recall은 작아지고, precision은 높아진다.
- ROC는 한 눈에 recall과 False Positive 를 그래프로 나타내준다.
- f1_score는 precision과 recall의 조화 평균값이다.
보통 데이터의 labels 비율이 불균형일 때 모델 성능 파악에 좋다고 한다.
왜 221a 과제부터 f1_score를 사용하라고 했는지 이제야 이해했다. 0이 더 많은 불균형 labels였기 때문이다.
**2. Impression from Today**
- 내 점수가 다른 분보다 작은 이유는 f1_score를 적용하지 못하고 accuracy_score로만 정확도를 확인해서였다.
- 월요일에 다른 과제에 휩쓸리다보니 221a 를 완성하지 못했기 때문에 화요일 과제 역시 accuracy_score로 진행했다.
- feature engineering 도 문제가 많아 점수가 낮을 수도 있지만,
모델 성능을 어떤 지표로 평가하느냐에 따라 테스트 예측 정확도에 영향력이 크다는 걸 배울 수 있어 좋은 경험이었다.
- 복습 위주로 오후 시간을 할애했지만 남은 시간 동안 잘 마무리할 수 있을거 같다.
- 따라가고 있어서 다행이다.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue body is the only material provided and records a Korean TIL entry about confusion matrices, precision, recall, thresholds, ROC, and F1 score. No repository file, test, entry point, or requested documentation change is identified; clarify the intended edit and consider the entry complete only when that requested change is specified and made.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, machine-learning
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100