K-Means Clustering
K-means clustering is an unsupervised method that partitions observations into a chosen number of clusters by iteratively assigning each observation to the nearest cluster mean and updating those means.
K-평균 군집분석은 각 관측치를 가장 가까운 군집 평균에 할당하고 그 평균을 갱신하는 과정을 반복하여 관측치를 정해진 수의 군집으로 나누는 비지도 학습 방법입니다.
How do I group observations into segments based on several numeric variables?
여러 수치형 변수를 기준으로 관측치를 세분집단으로 어떻게 나누나요?
K-means clustering divides observations into k groups so that each observation belongs to the cluster with the nearest centroid, minimizing within-cluster variance. It fits continuous, standardized variables when clusters are expected to be roughly spherical and of similar size, with k chosen using the elbow method or silhouette scores.
When to use K-Means Clustering
- Customer or respondent segmentation on several continuous variables
- Large datasets where a fast, simple partition is needed
- Exploratory grouping when roughly compact, similar-sized clusters are expected
When to use something else
- Irregularly shaped clusters or many outliers: use DBSCAN
- Probabilistic cluster membership is needed: use a Gaussian mixture model
Assumptions and requirements
- Continuous variables, standardized to comparable scales
- Number of clusters specified in advance
- Roughly spherical clusters of similar size
- Multiple random starts to avoid poor local solutions
What the analysis reports
- Cluster assignment for each observation
- Cluster centroids (profiles)
- Within-cluster sum of squares and elbow plot
- Average silhouette width
- Cluster sizes
How to report it
K-means clustering identified [k] clusters, selected using the elbow method and silhouette analysis (average silhouette width = [value]).
Related methods
- Hierarchical Clustering
- Gaussian Mixture Model (GMM)
- DBSCAN
Run K-Means Clustering on Quorant
- Data you need
- a table (CSV or Excel) with predictor (feature) columns
- Price
- 250 credits for one analysis up to 10,000 rows (complexity level 2); larger or wider data costs more. Optional methodologist review: 1200 credits.
- Checking
- Python results are cross-checked against R reference outputs in every deployment
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.