機器學習筆記 ---- K-Means Algorithm
阿新 • • 發佈:2018-11-18
1. K-Means Algorithm
- Randomly choose points as centroids, i-th is
- Divide all points into
groups by determining the minimum distance they have from all
- Change the centroids into the average of each groups
- Repeat until all centroids do not change
2. Obtimization Objective of K-Means
Let denote the group i-th point belongs to, then our task is
3. Random Initialization
Randomly pick
examples in which
is the number of centroids
May be stuck in local optima: Init and Run K-Means for many times, pick the solution with lowest
4. Choose the Number of Clusters
Elbow method / Depending on later purpose