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

Worksheet 6 Build a maintenance data set and split it without leaking

Analysis activity 90 minAssesses CLO5, CLO4

Objective

Build labels from a failure log, choose H and baselines, then split the data to match the deployment question while checking for leakage at every step

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 the group's seed and report the number of flights, failures and the prevalence table by H
  2. Choose one H with reasons from the technicians' lead time and explain how the end-of-log rows are handled
  3. Compute two baselines (always healthy, and a single-threshold rule) and report accuracy, recall and precision
  4. Run Example 2 with 50, 500 and 5,000 random features and write a short note on why the wrong method looks too good
  5. Run Example 3 with cut days 150, 200 and 300 and choose a split for a fleet that buys new drones every year
  6. Check all ten features one by one for whether the value is known at prediction time, with reasons

Record of results

Table 1 Prevalence by H and baselines
ItemLabelled flightsPositivesPrevalence or accuracyRecallPrecision
Table 2 Comparing splits
SplitPR-AUCSDTest prevalenceDeployment question answered
Table 3 Feature-by-feature check
FeatureKnown at prediction time?Reason

Questions

  1. Why does predicting healthy for every flight score higher accuracy than the technicians' rule, and which metrics must be reported alongside it?

  2. As the random features grow from 50 to 500 and 5,000, how does the wrong method's accuracy change, and why?

  3. The company buys new drones every year. Which split should it use, and why is that split's number the lowest?

  4. Which warning signs show that pct_life leaks, and how should data preparation be changed?

Check before you hand in

What to hand in

  • Prevalence-by-H table and baseline table
  • Short note on leaky feature selection
  • Table comparing splits and the chosen split
  • Feature-by-feature check table

CLO5 Develop, split, tune and evaluate models on automation and UAS data without leakage, and report results with uncertainty. CLO4 Explain and choose supervised and unsupervised learning algorithms (classification, regression, clustering, dimensionality reduction) to match the data and the question. (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