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

Worksheet 9 Cluster and reduce the production-line data

Analysis activity 90 minAssesses CLO4

Objective

Choose the number of clusters and the clustering technique to suit the data, set up DBSCAN, read PCA from its loadings, and read a t-SNE plot with care

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, tabulate k from 2 to 6 and write which k you choose and why
  2. Remove the standardisation before k-means and report how the result changes
  3. Run Example 2 with 1 to 8 components, look at the BIC and explain why the largest value should not be chosen
  4. Run Example 3 with eps refined between 0.8 and 1.5, choose a value and say who should inspect the flights labelled noise
  5. Run Example 4 on 8 columns of your own data, check the cumulative variance and write what PC1 and PC2 mean from the loadings
  6. Run Example 5 at perplexity 2, 15 and 200 and write which conclusions stay the same in every setting

Record of results

Table 1 Choosing k and the number of components
kInertiaSilhouetteARI (if an answer key exists)GMM BIC
Table 2 DBSCAN settings
epsmin_samplesClustersNoise pointsNoise that are injected anomalies
Table 3 PCA and t-SNE
ItemValueMeaning

Questions

  1. Which k does your silhouette point to, does it disagree with the technician's knowledge or the ARI, and which k did you choose and why?

  2. How do results change without standardisation before k-means or PCA? Explain with PC1 on raw units.

  3. Are flights that DBSCAN labels as noise always anomalies, and who should inspect them?

  4. Which conclusions from the t-SNE plots hold at every perplexity, and which must not be drawn?

Check before you hand in

What to hand in

  • Table of k with reasons and the BIC table
  • Table with the chosen eps and a proposal for the noise points
  • Meaning of PC1 and PC2
  • One-page summary of when to use k-means, GMM and DBSCAN

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