We analyze the running time of the Hartigan-Wong method, an old algorithm for the $k$-means clustering problem. First, we construct an instance on the line on which the method can take $2^{\Omega(n)}$ steps to converge, demonstrating that the Hartigan-Wong method has exponential worst-case running time even when $k$-means is easy to solve. As this is in contrast to the empirical performance of the algorithm, we also analyze the running time in the framework of smoothed analysis. In particular, given an instance of $n$ points in $d$ dimensions, we prove that the expected number of iterations needed for the Hartigan-Wong method to terminate is bounded by $k^{12kd}\cdot poly(n, k, d, 1/\sigma)$ when the points in the instance are perturbed by independent $d$-dimensional Gaussian random variables of mean $0$ and standard deviation $\sigma$.
翻译:我们分析了Hartigan-Wong方法的运行时间,这是一种用于$k$-均值聚类问题的经典算法。首先,我们在直线上构造了一个实例,该方法在此实例上可能需要$2^{\Omega(n)}$步才能收敛,这表明即使$k$-均值问题易于求解,Hartigan-Wong方法仍具有指数级的最坏情况运行时间。由于这与算法的实际表现形成对比,我们还在平滑分析的框架下分析了其运行时间。具体而言,给定一个包含$d$维空间内$n$个点的实例,我们证明当该实例中的点被均值为0、标准差为$\sigma$的独立$d$维高斯随机变量扰动后,Hartigan-Wong方法终止所需的期望迭代次数受$k^{12kd}\cdot \text{poly}(n, k, d, 1/\sigma)$的约束。