K-means initialization for waveforms.