机器学习笔记 ---- K-Means Algorithm

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sinat_35406909/article/details/82291094

1. K-Means Algorithm

  • Randomly choose x points as centroids, i-th is μ i
  • Divide all points into x groups by determining the minimum distance they have from all x centroids
  • Change the centroids into the average of each groups
  • Repeat until all centroids do not change

2. Obtimization Objective of K-Means

Let c ( i ) denote the group i-th point belongs to, then our task is

m i n c , μ J ( c , μ ) = ( x ( i ) μ c ( i ) ) 2


3. Random Initialization


Randomly pick k examples in which k is the number of centroids
May be stuck in local optima: Init and Run K-Means for many times, pick the solution with lowest J

4. Choose the Number of Clusters


Elbow method / Depending on later purpose

猜你喜欢

转载自blog.csdn.net/sinat_35406909/article/details/82291094
今日推荐