The k-means approach involves partitioning the data space into k different clusters of objects, so that the sum of squared Euclidean distances between the centre of each cluster and the individual objects inside that cluster is minimised. The goodness-of-fit of k-means algorithm is often expressed in terms of variance explained, defined as follows: