Finding the principal components of a set of data