¡ì Centroid-based: describe each cluster by its mean
¡ì Goal: assign data to K.
¡ì Algorithm objective: minimize the within-cluster variances of all clusters.
Copyright By PowCoder代写 加微信 powcoder
Initialize 2 clusters and assign points to clusters
Adjust mean
Reassign points to clusters and adjust mean
Reassign points to clusters and adjust mean
Repeat this, until no cluster changes
If we have a different starting point
Initial clusters Final clusters
¡ì A non-deterministic method
¡ì Finds a local optimal result (multiple restarts are often necessary)
Algorithm description
Euclidean distance
For each dimension j of xi in cluster k:
(“$#,&)/)* #
K-means: finding optimal k
¡ì Plot the cost for each k and find the ¡°Elbow¡±
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com