Clustering and reconstructing large data sets