Similar to the linear Regression,k-means algorithm optimization objective or an attempt to minimize the cost function.
Understanding the optimization of the K-means algorithm objective help us (1) debug the algorithm to see if the algorithm is running correctly (as you can see in this section)(2) to make the algorithm find a better cluster, Avoid local optimal solutions (as explained in the next section)
K-means Optimization Objective
UC (i): The cluster of the cluster that represents X (i) centroid
K indicates that there are K cluster,k that represent the index of the cluster centoid.
Cost function is x (i) to the sum of the squares of the distance of the cluster centroid belonging to its cluster
The parameter C and u are obtained by calculating the minimum value of the cost function.
This cost function is sometimes referred to as the distortion costs function
K-means algorithm
Wrt:with respect to (about)
Cluster Assignment Step: The C value when you fix the U and C as the parameter to find the minimum value of function J (c)
Move centroid Step: c fixed, u as parameter to find the minimum value of the cost function J (U)
The final C and U are obtained by means of loop convergence.
So we can see if the program is working correctly by the relationship between the number of iterations and the function of the cost function. The correct running program should be as the number of iterations increases, the cost function decreases and converges
Summarize
- The process of K-means algorithm is to minimize cost function J to find optimal parameters.
- Determine if the algorithm is running correctly by convergence with the cost function as the number of iterations increases
K-means:optimization objective (Minimize cost function to find the corresponding parameter)