UAT 456 Artificial Intelligence, Machine Learning and Computer Vision for UAS
Worksheet 9 Cluster and reduce the production-line data
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
- Run Example 1 with the group's seed, tabulate k from 2 to 6 and write which k you choose and why
- Remove the standardisation before k-means and report how the result changes
- Run Example 2 with 1 to 8 components, look at the BIC and explain why the largest value should not be chosen
- Run Example 3 with eps refined between 0.8 and 1.5, choose a value and say who should inspect the flights labelled noise
- Run Example 4 on 8 columns of your own data, check the cumulative variance and write what PC1 and PC2 mean from the loadings
- Run Example 5 at perplexity 2, 15 and 200 and write which conclusions stay the same in every setting
Record of results
| k | Inertia | Silhouette | ARI (if an answer key exists) | GMM BIC |
|---|---|---|---|---|
| eps | min_samples | Clusters | Noise points | Noise that are injected anomalies |
|---|---|---|---|---|
| Item | Value | Meaning |
|---|---|---|
Questions
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?
How do results change without standardisation before k-means or PCA? Explain with PC1 on raw units.
Are flights that DBSCAN labels as noise always anomalies, and who should inspect them?
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