**2. Background**

#### *2.1. K-Means (K-M) Clustering Algorithm*

The K-M is a common clustering algorithm for data mining used in many real life applications, such as healthcare, environment and air pollution, and industry data. It outputs k centers that partition input points into k clusters [12–14]. However, it has some disadvantages, such as specifying the number of k clusters, as it is based on the practical experience and knowledge. An example of how to select the k number is shown in Figure 1. It has two clusterings, where the dark crosses specify the k centers. There are five k values used on the left. In addition, there are many centers that could be used on the right, even though one center can sufficiently represent the data [15]. The main K-M problems

are its sensitivity to initialization and getting trapped in local optima [16]. Therefore, meta-heuristics algorithms are used to escape from these problems.

**Figure 1.** An example of the K-means clustering algorithm.

The K-M calculates the center of each cluster as the mean value of points that belong to the cluster. It works as follows: let D denotes the entire dataset, n the number of data objects, and d the number of features Rd, i.e., D = {x1, x2, ..., xn}, and we want to partition set X into K partitions. K-M tries to obtain the best set of centers C = .C1, ..., <sup>C</sup><sup>k</sup>'. Let Cj denote class j with cardinality Sj; then we can calculate Cj, j = 1, ... , K according to the following equation:

$$\mathbf{C}^{\circ} = \frac{1}{|\mathbf{S}\_{\uparrow}|} \sum\_{\mathbf{x} \in \mathbf{S}\_{\uparrow}} \mathbf{x} \tag{1}$$

In order to measure the goodness of different sets of centers, objective function f(C) can be calculated for each set of centers using the minimum sum of squares [10,11], defined by the following:

$$\text{rf}(\mathbb{C}) = \frac{1}{n} \sum\_{i=1}^{n} \text{mid } \left( \mathbb{C}\_{\text{j}}, \ge\_{\text{i}} \right) \tag{2}$$

where dCj, xi corresponds to the squared Euclidean distance between the center of class C and the point xi.

K-M is known for its low computational requirements and ease of implementation. The main K-M problems are its sensitivity to initialization and becoming trapped in local optima [16,28]. Therefore, the meta-heuristics algorithms are used to escape from these problems.

#### *2.2. Meta-Heuristics Clustering Algorithm*

There are many meta-heuristics methods that can be used with K-M in order to increase its efficiency and treat its problems. The literature shows that there are several methods proposed in order to compete local optima problem of K-M, such as SA, TS, and the genetic algorithm (GA) [23].

A hybrid algorithm that uses GA and K-M (GKA) was proposed in [29,30]. GKA uses GA as a search operator, as it finds a globally optimal partition [31,32].

In addition, a hybrid algorithm was proposed in [33] to solve the problems of K-M based on GA and the weighted K-M algorithm. Moreover, another hybrid algorithm using K-M and SA was proposed in [34].

A comparison of implementation complexity and computational cost between the most common clustering algorithms was summarized, as shown Table 1 [16,23,35–37].


**Table 1.** Comparison between different optimization and metaheuristics algorithms [2,22,38–40].

#### 2.2.1. Tabu Search (TS) Clustering Algorithm

TS is considered to be one of the meta-heuristics algorithms that is based on memory objects to make economic exploitation and exploration for search space. Tabu list (TL) is one of the main memory elements of TS. It is a list that contains recently visited solutions by TS. It is used by TS in order to avoid re-entering pre-visited regions.
