UAT 456 Artificial Intelligence, Machine Learning and Computer Vision for UAS
Worksheet 6 Build a maintenance data set and split it without leaking
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
- Run Example 1 with the group's seed and report the number of flights, failures and the prevalence table by H
- Choose one H with reasons from the technicians' lead time and explain how the end-of-log rows are handled
- Compute two baselines (always healthy, and a single-threshold rule) and report accuracy, recall and precision
- Run Example 2 with 50, 500 and 5,000 random features and write a short note on why the wrong method looks too good
- Run Example 3 with cut days 150, 200 and 300 and choose a split for a fleet that buys new drones every year
- Check all ten features one by one for whether the value is known at prediction time, with reasons
Record of results
| Item | Labelled flights | Positives | Prevalence or accuracy | Recall | Precision |
|---|---|---|---|---|---|
| Split | PR-AUC | SD | Test prevalence | Deployment question answered |
|---|---|---|---|---|
| Feature | Known at prediction time? | Reason |
|---|---|---|
Questions
Why does predicting healthy for every flight score higher accuracy than the technicians' rule, and which metrics must be reported alongside it?
As the random features grow from 50 to 500 and 5,000, how does the wrong method's accuracy change, and why?
The company buys new drones every year. Which split should it use, and why is that split's number the lowest?
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