K-means clustering for pattern recognition