Skip to content

Methods · Machine learning · Number of clusters

Weighted Gap Statistic for the Number of Clusters

The weighted gap statistic chooses the number of clusters by comparing how tight k-means clusters are in the data with how tight they are in reference data without cluster structure (uniform in the data's bounding box). Unlike the ordinary gap statistic, each cluster's dispersion is its average pairwise squared distance, which removes the bias towards splitting large clusters. The DD-weighted gap picks the k where the gap curve bends most sharply.

가중 갭 통계량은 자료에서 얻은 k-평균 군집이 얼마나 촘촘한지를, 군집 구조가 없는 기준 자료(자료의 범위 상자 안 균등분포)에서의 촘촘함과 비교해 군집 수를 고릅니다. 보통의 갭 통계량과 달리 각 군집의 흩어짐을 쌍별 제곱거리의 평균으로 재므로 큰 군집을 쪼개려는 치우침이 줄어듭니다. DD 가중 갭은 갭 곡선이 가장 크게 꺾이는 k를 고릅니다.

How many clusters are there, judged against data with no clusters at all?

군집이 전혀 없는 자료와 견주어 볼 때 군집은 몇 개입니까?

The method reports the weighted gap and its standard error for each k, the DD-weighted gap, the k chosen by the selected rule, the choices of the other rules and of the ordinary gap statistic, and the cluster sizes.

When to use Weighted Gap Statistic for the Number of Clusters

When to use something else

Assumptions and requirements

What the analysis reports

How to report it

The DD-weighted gap statistic ([value] uniform reference sets, k = 1 to [value]) selected k = [value] clusters.

Related methods

How this method is validated

이 방법의 검증 근거

  • Independent computation. 1 reference test compares the results with scikit-learn and direct computations (formulas, enumeration or simulation) at a stated tolerance of 1e-9.

    독립 계산. scikit-learn·직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과(허용오차 1e-9).

Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.

허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.

Run Weighted Gap Statistic for the Number of Clusters on Quorant

Data you need
a table (CSV or Excel) with predictor (feature) columns
Price
600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 credits.
Checking
Compared with independent computations
Before you pay
A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.

Method ID Q71168 · Reviewed 2026-10-25