Sampling based k means clustering