K-means clustering with HMM