Skip to content

Methods · Clustering · Partitioning clustering

Optimal Univariate k-Means Clustering (Exact Dynamic Programming)

Optimal univariate k-means splits a single variable into k contiguous groups that minimise the within-group sum of squares exactly, using dynamic programming instead of random starts. The number of groups can be fixed or chosen by the BIC of the implied Gaussian mixture.

최적 일변량 k-평균은 한 변수를 연속 구간 k개로 나누되 군내 제곱합을 동적계획법으로 정확히 최소화합니다. 무작위 시작점이 필요 없으며, 군집 수는 고정하거나 대응하는 정규 혼합의 BIC로 고릅니다.

How should incomes in a region be divided into a few classes so that each class is as homogeneous as possible?

한 지역의 소득을 몇 개 계급으로 나눌 때 각 계급이 가장 동질적이 되게 하려면 경계를 어디에 두어야 합니까?

The method returns the class breaks, size, range and mean of each class, the share of variance explained and, when k is chosen, the BIC for each candidate number of classes.

When to use Optimal Univariate k-Means Clustering (Exact Dynamic Programming)

When to use something else

Assumptions and requirements

What the analysis reports

How to report it

Optimal 1-D k-means gave [k] classes with breaks at [value] and [value], explaining [value]% of the variance.

Related methods

How this method is validated

이 방법의 검증 근거

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

    독립 계산. 직접 계산(식·열거·모의실험) 대조 참조 시험 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 Optimal Univariate k-Means Clustering (Exact Dynamic Programming) on Quorant

Data you need
a table (CSV or Excel) with an outcome variable
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
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 Q31044 · Reviewed 2026-10-25