K-means clustering is an unsupervised learning algorithm that groups unlabeled data points into a specified number of clusters based on their distances from initial random cluster centroids. It works by first randomly selecting cluster centroids, then assigning each data point to the closest centroid and adjusting the centroid positions iteratively until the clusters are stable or the maximum number of iterations is reached. Choosing the optimal number of clusters is important for accurate clustering results.
Related topics: