# K-Means Clustering Algorithm Based on Chaotic Adaptive Artificial Bee Colony
## 3 Chaotic Adaptive Artificial Bee Colony (CAABC) for Clustering
### The Procedures of CAABC-K-means  
The novel clustering algorithm is integrated with chaotic adaptive artificial bee colony (CAABC) and K-means cluster (KMC) algorithm. The new location obtained by CAABC is used as the initial point of KMC for iteration process, and then the new center point obtained after calculation is applied to update the swarm. In order to match up to KMC, the max-min distance product algorithm and a novel fitness function are proposed based upon ABC algorithm. In the search space, the step length is reduced adaptively when the search approaches the optimum solution. Moreover, the cross-operation increases population diversity in the position updating process. Furthermore, the ergodicity of Fuch chaotic perturbation is carried out on the elite solution and infeasible solutions, meanwhile, the inferior solution is accepted with a certain probability according to the metropolis rule. Hence, the points are easier to jump out of the local optimum, and the prematurity of ABC algorithm has been largely curbed. The employed bee is translated into a scout when the food source of which has been exhausted. If a scout discovered a valuable food source, it would be employed.  
In this way, CAABC algorithm and K-mean clustering are alternately performed until the end of the algorithm. The flow chart of algorithm execution is shown in Figure 5. The main steps of the algorithm can be described as follows:Figure 5: Flow chart of Chaotic Adaptive Artificial Bee Colony-Kmeans.  
Initial parameters are set as follows: \(N\) represents the number of population, \(D\) denotes the space vector dimension, \(max\)_cycle_ is the maximum iteration times, and cross parameter \(cr=0.6\). \(limit\) is the threshold of maximum optimization times, and the annealing coefficient \(\sigma=0.95\). The initial population is obtained according to the max-min distance product algorithm.
2. The fitness value can be obtained according to Equation (3), and then solution approaches to the global optimal solution. At the same time, chaotic perturbations are added into the elite solution, which is selected from the preponderant solution set randomly and the infeasible solution in the bottom 15% according to Equation (16). The position is updated according to Equation (14) or Equation (15). Eventually, the location of the honey source is extended to the D-dimensional space. Whether the new solution is accepted depends on the Metropolis criteria.
3. Onlooker bee executes the employed bee option and neighborhood searching performs under the same criteria.
4. The updated location information, which is obtained after all the onlooker bees have completed the search, is used as the clustering center, the data set is performed a K-means iterative clustering, and the clustering center of each class is refreshed with the clustering division.
5. If \(limit\) for abandonment is reached, the employed bee determines whether the number of updates reaches the limit. If the limit is reached, the employed bee is translated into a scout when the food source of which has been exhausted. A new round of honey source searching begins.
6. If the number of iterations has reached the maximum \"\(max\)_cycle_\", the optimal solution is output, otherwise, the algorithm goes back to step 2.
7. K-means algorithm is executed to get results.