UAT 456 Artificial Intelligence, Machine Learning and Computer Vision for UAS
Worksheet 7 Choose and evaluate classifiers to match the task
Objective
Read classifier results with metrics suited to imbalanced data, choose a model family, and report a one-shot test result against the technicians' rule
Equipment and materials
- Computer with Python, numpy, pandas, scikit-learn and matplotlib
- The example code at /downloads/uat-456/
- The department's real flight or PLC logs (if available), with person-identifying columns removed
Safety
- Desk work, no flying; keep any real data that identifies a person within the group
Steps
- Run Example 1 with thresholds 0.3, 0.5 and 0.7 and tabulate precision and recall against the technicians' rule
- Project the model's precision at an assumed 3% prevalence and write how many false alarms a technician sees per correct alarm
- Run Example 2 with acceptable cap-torque bands of 0.3 and 0.8 N·m and try removing the err feature
- Pick a new set of 12 caps, compute the root Gini and the best split by hand, and compare with DecisionTreeClassifier
- Tabulate boosting learning rates 0.3, 0.1 and 0.03 against 50 to 500 trees and mark where overfitting starts
- Run Example 5 with test cut days 200 and 300 and write a one-page report on the chosen model family and why
Record of results
| Model or rule | Threshold | TP | FP | Precision | Recall |
|---|---|---|---|---|---|
| Node | Caps | Defective | Gini | Cut point |
|---|---|---|---|---|
| Learning rate | 50 trees | 100 trees | 200 trees | 500 trees |
|---|---|---|---|---|
Questions
If the target fleet has an assumed prevalence of 3%, what precision remains at threshold 0.5, and how many false alarms does a technician see per correct alarm?
Does weighting the positive class or moving the threshold really improve the model? Explain with ROC-AUC and PR-AUC.
Why does logistic regression score a low PR-AUC on the cap data but the highest with |torque − setpoint|, and what happens when err is removed?
In your model-choice report, how do the PR-AUC differences between the best families compare with the SD across windows, and what should you conclude?
Check before you hand in
What to hand in
- Precision and recall table by threshold
- Hand Gini calculation
- Learning-rate versus number-of-trees table
- One-page model-choice report