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

Worksheet 8 Regression, regularisation and time-series forecasting

Analysis activity 90 minAssesses CLO4, CLO5

Objective

Apply ridge and lasso to correlated features, report the valid range of the model, and evaluate a time series with walk-forward against persistence

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 3, 5, 10 and 20 training packs and compare the SD of the cycles coefficient for OLS and ridge
  2. Add one more feature correlated with cycles and see how the OLS SD changes and how much ridge helps
  3. Run Example 2 with a finer alpha grid and choose a value with reasons from the flatness of the CV curve
  4. Run Example 3 with the training edge at cycles 200 and 350 and record RMSE by band
  5. Write a short model note stating the training range and the cycle range not to use
  6. Run Example 4 adding lag48 and removing day, and compare walk-forward and shuffled-fold MAE

Record of results

Table 1 SD of the cycles coefficient by number of packs
Training packsOLS SDRidge SDOLS RMSERidge RMSE
Table 2 RMSE by cycle band
Training edge (cycles)Model310-350360-400410-450
Table 3 Time-series MAE
Feature setModelWalk-forward MAEShuffled-fold MAESkill against persistence

Questions

  1. Why does the coefficient SD fall as training data grows, and why must the coefficients of correlated features not be read as engineering explanations?

  2. From the finer alpha CV curve, which value did you choose, and why is the lowest point in a flat range not the only right choice?

  3. When the training edge passes the ageing knee (for example 350 cycles), how does the random forest change, and what must the model note state?

  4. What is your skill against persistence, and why is the shuffled-fold MAE too good?

Check before you hand in

What to hand in

  • Graph of coefficient SD by number of packs
  • RMSE-by-band table
  • Short model note
  • Table of walk-forward and shuffled-fold MAE and the skill against persistence

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