Clustering and Dimensionality Reduction - Obesity and Gene-Expression Data
KMeans, KMeans++, DBSCAN and PCA on an obesity dataset and TCGA gene-expression data - and an honest look at why a tighter cluster isn't automatically a more useful one.
Overview
An unsupervised learning assignment for Deakin's SIT720 Machine Learning unit, comparing clustering and dimensionality-reduction methods on a real obesity dataset and the TCGA pan-cancer gene-expression dataset.
The problem
It's tempting to treat a higher silhouette score or a tighter cluster as 'better,' but clustering optimises geometry, not meaning - the task was to find out whether the clusters a purely geometric algorithm discovers actually line up with real, medically defined categories, and to explain the gap when they don't.
My approach
Standard-scaled the numeric features and one-hot encoded the categorical ones (producing a 31-dimensional feature space), then scanned KMeans across k = 2 to 20 and selected k by silhouette score. Compared KMeans vs. KMeans++ initialisation stability across 50 random runs using the Adjusted Rand Index, used a k-distance plot to tune DBSCAN's eps parameter, and applied PCA to the high-dimensional TCGA gene-expression dataset to visualise how cleanly five cancer types separate in just three principal components.



