What is the time complexity of k-means?

前端 未结 3 757
慢半拍i
慢半拍i 2021-02-04 07:06

I was going through the k-means Wikipedia page. Based on the algorithm, I think the complexity is O(n*k*i) (n = total elements, k = number

3条回答
  •  灰色年华
    2021-02-04 07:26

    The problem is NP-Hard because there is another well known NP hard problem that can be reduced to (planar) k-means problem. Have a look at the paper The Planar k-means Problem is NP-hard (by Mahajan et al.) for more info.

提交回复
热议问题