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

Worksheet 10 Hand over a maintenance model with results you can trust

Analysis activity 90 minAssesses CLO6, CLO5

Objective

Check that tuning really helped, choose a threshold from cost, report results with uncertainty, set monitoring conditions and write a model card

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
  • Do not use a maintenance model to assess people, and do not load model files from unknown sources

Steps

  1. Run Example 1 with a random-search budget of 60 and nested cross-validation over random-forest hyper-parameters; report the selection bias
  2. Run Example 2 with defective-cap costs of 20, 60 and 150 baht, compute p* by hand and compare the cost per 1,000 caps
  3. Run Example 3 with mid-job failure costs of 15,000 and 100,000 baht and write a one-sentence report statement honest about the uncertainty interval
  4. Run Example 4 with vibration shifts of 1.0 and 5.0 (and negative values) and see whether the retraining rule still catches them
  5. Run Example 5 on the bottling-line data of module 9, compute grouped permutation importance and write a one-paragraph explanation for a technician
  6. Write a one-page model card stating the use, the prohibitions, the test result with its uncertainty interval, the retraining condition and the personal data removed

Record of results

Table 1 Selection bias
TrialScore reported by the searchOuter scoreDefault on the same foldsBias
Table 2 Threshold by cost
Cost of a defective cap reaching a customer (baht)p* by handCost per 1,000 caps, raw forestCost per 1,000 caps, calibrated
Table 3 Policy cost and monitoring
CaseInspectionsCaughtMissedCost (thousand baht) or KS and alert rate

Questions

  1. When the random-search budget rises from 27 to 60, does the best score rise because the model improved or because the maximum of noisy numbers rose? Answer with nested CV.

  2. If a defective cap reaching a customer costs 150 baht, what is p*, and should a cap with probability 0.03 be rejected?

  3. Write a one-sentence report of the test result that is honest about its uncertainty interval, and explain why whole airframes are resampled.

  4. Why do separate permutation importances of vib and vib_r5 add up to less than shuffling them together, and how would you explain this to a technician?

  5. When the vibration shift is negative, how does the effect on alerts differ from an upward shift, and does the KS-based retraining rule still catch it?

Check before you hand in

What to hand in

  • Selection-bias table and p*-by-cost table
  • Report statement of the test result with its uncertainty interval
  • Permutation-importance explanation for a technician
  • One-page model card

CLO6 Hand over and monitor models ethically: set cost-based thresholds, detect drift, explain models and protect personal data. 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