Top "K-means" questions

In statistics and data mining, k-means clustering is a method of cluster analysis which aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean (least squares).

kmeans scatter plot: plot different colors per cluster

I am trying to do a scatter plot of a kmeans output which clusters sentences of the same topic together. …

python numpy matplotlib scipy k-means
column vectors to matrix in R

I have a set of vectors V_1, V_2, ..., V_n that I would like to convert to a matrix. Each …

r matrix k-means
Calculating the percentage of variance measure for k-means?

On the Wikipedia page, an elbow method is described for determining the number of clusters in k-means. The built-in method …

python numpy statistics cluster-analysis k-means
Simple approach to assigning clusters for new data after k-means clustering

I'm running k-means clustering on a data frame df1, and I'm looking for a simple approach to computing the closest …

r k-means
K-means algorithm variation with equal cluster size

I'm looking for the fastest algorithm for grouping points on a map into equally sized groups, by distance. The k-means …

algorithm map cluster-analysis k-means
Clustering text documents using scikit-learn kmeans in Python

I need to implement scikit-learn's kMeans for clustering text documents. The example code works fine as it is but takes …

python python-2.7 scikit-learn cluster-analysis k-means
whats is the difference between "k means" and "fuzzy c means" objective functions?

I am trying to see if the performance of both can be compared based on the objective functions they work …

cluster-analysis k-means fuzzy-c-means
OpenCV using k-means to posterize an image

I want to posterize an image with k-means and OpenCV in C++ interface (cv namespace) and I get weird results. …

c++ image-processing opencv k-means noise-reduction
How to use silhouette score in k-means clustering from sklearn library?

I'd like to use silhouette score in my script, to automatically compute number of clusters in k-means clustering from sklearn. …

python-2.7 machine-learning scikit-learn k-means silhouette
How Could One Implement the K-Means++ Algorithm?

I am having trouble fully understanding the K-Means++ algorithm. I am interested exactly how the first k centroids are picked, …

algorithm language-agnostic machine-learning cluster-analysis k-means