UAT 315 Artificial Intelligence, Data Analytics and Computer Vision for Unmanned Aircraft Systems
Worksheet 2 Designing an ML task for maintenance
Objective
Frame an ML problem, choose a metric from the cost of errors and pick a threshold with reasons
Equipment and materials
- Laptop with Python and scikit-learn
- Example code from the module 2 lesson
Safety
- Classroom work only; no flying
Steps
- Define a problem such as predicting whether a battery should be retired; state the task type, whether it is supervised and where labels come from
- Discuss how the cost of FN and FP differ for that task and choose the main metric
- Set the code's threshold to 0.2 and 0.5, record accuracy and recall, and choose a threshold with reasons
- Explain to a peer why the test set must not be used to choose tree depth
Record of results
| Threshold | Accuracy | Recall | Alerts (pred.sum()) | What you notice |
|---|---|---|---|---|
Questions
At threshold 0.2 the model's accuracy equals the always-'healthy' baseline. Does that make the model useless? Explain with the recall and alert counts in Table 2.
Which threshold did your group choose for its task, and how do the FN and FP harms in Record 1 support that choice?
In the lesson's tree-depth table, training accuracy reaches 1.000. Why choose depth 3, and what would go wrong if the test set were used to choose depth?
The test result in Example 1 (accuracy 0.800, recall 0.412) is much worse than validation. Give at least two reasons and what to do next without breaking the independence of the test set.
Check before you hand in
What to hand in
- Problem definition
- Main metric with reasons
- Threshold table and choice
- Summary of the test-set rule