k-Means Clustering

k-Means clustering is an unsupervised learning algorithm used to partition a dataset into k distinct clusters based on similarity. The algorithm iteratively assigns each data point to the nearest cluster center (centroid) and updates the centroids until convergence. k-Means clustering is commonly used for customer segmentation, anomaly detection, and data compression.