UAT 456 Artificial Intelligence, Machine Learning and Computer Vision for UAS

Worksheet 7 Choose and evaluate classifiers to match the task

Analysis activity 90 minAssesses CLO4, CLO5

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

  1. Run Example 1 with thresholds 0.3, 0.5 and 0.7 and tabulate precision and recall against the technicians' rule
  2. Project the model's precision at an assumed 3% prevalence and write how many false alarms a technician sees per correct alarm
  3. Run Example 2 with acceptable cap-torque bands of 0.3 and 0.8 N·m and try removing the err feature
  4. Pick a new set of 12 caps, compute the root Gini and the best split by hand, and compare with DecisionTreeClassifier
  5. Tabulate boosting learning rates 0.3, 0.1 and 0.03 against 50 to 500 trees and mark where overfitting starts
  6. 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

Table 1 Precision and recall by threshold
Model or ruleThresholdTPFPPrecisionRecall
Table 2 Hand Gini for 12 caps
NodeCapsDefectiveGiniCut point
Table 3 Boosting learning rate against number of trees
Learning rate50 trees100 trees200 trees500 trees

Questions

  1. 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?

  2. Does weighting the positive class or moving the threshold really improve the model? Explain with ROC-AUC and PR-AUC.

  3. 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?

  4. 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

CLO4 Explain and choose supervised and unsupervised learning algorithms (classification, regression, clustering, dimensionality reduction) to match the data and the question. CLO5 Develop, split, tune and evaluate models on automation and UAS data without leakage, and report results with uncertainty. (CLOs are a web-team draft; the course owner sets the final ones.)

Instructors: answers and teaching notes for this worksheet are in the teaching pack