သဘောတရား · AIF-C01 အပေါ် ဆက်လေ့လာရန်
Evaluating traditional ML models
Pick the metric that matches the cost of a mistake, set the threshold, and split the data so the score is honest.
ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။
AI Practitioner မှ သင်သိပြီးသားများ
- Accuracy, precision, recall, F1 and AUC-ROC score classifiers. MAE, RMSE, MAPE and R squared score number predictions.
- Accuracy misleads when one class is rare.
A missed case is costly
- Recall
False alarms are costly
- Precision
One balanced score
- F1
Rare positive class
- PR AUC
Separating two classes
- ROC AUC
Large misses hurt most
- RMSE
Outliers in the data
- MAE
Error as a percent
- MAPE
| Situation | Metric |
|---|---|
| A missed case is costly | Recall |
| False alarms are costly | Precision |
| One balanced score | F1 |
| Rare positive class | PR AUC |
| Separating two classes | ROC AUC |
| Large misses hurt most | RMSE |
| Outliers in the data | MAE |
| Error as a percent | MAPE |
1 / 2
A missed case is costly
- Recall
False alarms are costly
- Precision
One balanced score
- F1
Rare positive class
- PR AUC
| Situation | Metric |
|---|---|
| A missed case is costly | Recall |
| False alarms are costly | Precision |
| One balanced score | F1 |
| Rare positive class | PR AUC |
2 / 2
Separating two classes
- ROC AUC
Large misses hurt most
- RMSE
Outliers in the data
- MAE
Error as a percent
- MAPE
| Situation | Metric |
|---|---|
| Separating two classes | ROC AUC |
| Large misses hurt most | RMSE |
| Outliers in the data | MAE |
| Error as a percent | MAPE |
Holdout
- Use when
- Plenty of data
- Watch for
- Tuning on the test set
K-fold
- Use when
- Small data
- Watch for
- k trainings to pay for
Stratified
- Use when
- Imbalanced classes
- Watch for
- A rare class missing
Time-ordered
- Use when
- Time series
- Watch for
- Never shuffle
| Split | Use when | Watch for |
|---|---|---|
| Holdout | Plenty of data | Tuning on the test set |
| K-fold | Small data | k trainings to pay for |
| Stratified | Imbalanced classes | A rare class missing |
| Time-ordered | Time series | Never shuffle |
ဘာလဲ
Classification metrics all start from the confusion matrix: true positives (TP), false positives (FP), false negatives (FN) and true negatives (TN). Precision is TP / (TP + FP). Recall is TP / (TP + FN). F1 is the harmonic mean of the two, so it is low when either one is low.
ဘာလဲ
A classifier outputs a score, and a threshold turns it into a class. Raise the threshold and you flag fewer items: precision up, recall down. Lower it and the reverse happens. Choose the threshold from the cost of each error, not the default of 0.5. The ROC curve plots recall (true positive rate) against the false positive rate over all thresholds, and ROC AUC is the area under it. The precision-recall curve plots precision against recall, and PR AUC is its area. When positives are rare, ROC AUC can look high because the many true negatives keep the false positive rate small. Use PR AUC and F1 there.
ဘာလဲ
RMSE is in the unit of the target and punishes large misses more. MAE is in the same unit and treats every miss alike, so outliers hurt it less. MAPE is a percent but breaks when actual values are near zero. R squared is the share of variance explained and can be below zero for a poor model. Compare models on the same data with the same metric.
ဘာလဲ
Splits keep the score honest. Holdout means a training set, a validation set to tune on, and a test set you touch once. k-fold cross-validation trains k times, each time holding out one fold, and averages the k scores. It suits small data. A stratified split keeps class ratios. For time series, split in time order (train on the past, test on later data, often with a rolling window) and never shuffle, or the model sees the future. Compare models on the same split and look at the spread across folds.
မှတ်ထားရန်
- Precision = TP / (TP + FP). Recall = TP / (TP + FN). F1 balances them.
- Rare positives: prefer PR AUC over ROC AUC.
- RMSE punishes big errors, MAE resists outliers, MAPE fails near zero.
စာမေးပွဲမှာ
- “Missing a fraud case is costly” points to recall and a lower threshold.
- “Only 1 percent of cases are positive; which curve is more informative” points to the precision-recall curve.
- “Validate a forecasting model without leaking the future” points to a time-ordered split.
ဒါတွေနဲ့ မရောပါနဲ့
ဒီ task ထဲမှာ · 2.3
- Experiment tracking: managed MLflow
- Amazon Bedrock evaluations
- Performance baselines and drift detection
- Shadow variants and A/B tests
- Explaining model outputs
- Debugging model convergence
- Evaluating traditional ML models
- NLP and text-generation metrics
- Human evaluation and human-in-the-loop
- LLM-as-a-judge and AI output assessment
- Evaluating RAG retrieval and answers