Center Adjustment

The center adjustment method as shown in Algorithm 1 is used to re-compute the centers according to the data objects related to each center. It re-assigns each data object x to center Cj, j = 1, ... , K with minimum Euclidean distance between center and data object. Applying K-M, a new set of centers according to mean values of related objects to each center is computed. Equations (3) and (4) are used in Algorithm 1.

$$\mathbf{j}^\* = \begin{array}{c} \text{arg} \\ \mathbf{j} = 1, \dots, \mathbf{k} \end{array} \parallel \mathbf{x}^\mathbf{i} - \widetilde{\mathbf{C}}^{\mathbf{(j)}} \parallel \tag{3}$$

$$\left|\hat{\mathbf{C}}^{(\mathbf{j})}\right| = \frac{1}{\left|\mathbf{S}\_{\hat{\mathbf{j}}}\right|} \sum\_{\mathbf{x} \in \mathbf{S}\_{\hat{\mathbf{j}}}} \mathbf{x} \tag{4}$$

#### **Algorithm 1:** Center Adjust(K, C, d, D)

\$


2.1. Compute the Euclidean distance between data object xi and each center C \$(j), j = 1, . . . , K. 2.2. Add xi to Sj∗ where


Compute Equation (4)

4. Return C \$(j), j = 1, . . . , K.

#### **3. The Proposed MHTSASM Algorithm**

In this paper, the MHTSASM algorithm is proposed for data clustering, which is based on TS and K-M. Figure 2 shows the proposed MHTSASM algorithm framework. The MHTSASM starts with a random initial solution. It obtains neighbors of the current solution called trial solutions and updates memory elements for each iteration. Furthermore, it uses intensification and diversification strategies guided by memory elements to enhance the search process. Thus, it is a high level TS algorithm with long term memory elements. In the following subsections, the main components of MHTSASM are explained.

#### *3.1. Intensification and Diversification Strategies*

The TS has two highly important components called (1) intensification strategy; and (2) diversification strategy. The MHTSASM uses both intensification and diversification strategies guided by ASM. Intensification tries to immigrate to best solutions. It can recruit a return into striking regions in order to explore them more systematically. Furthermore, intensification techniques require saving elite solutions to be able to examine their neighbors, and thus the MHTSASM records elite solutions in EL. The MHTSASM may use the responsive memory ASMu in order to keep track of best partitions of each feature in the search space.

The intensification method as shown in Algorithm 2 is guided by ASMu. It selects a random number of features from d features. The MHTSASM selects a partition with the highest updating improvement value for the current center for each selected feature. Each selected feature value is updated with a random value in range between the current feature value and the selected partition. The memory elements are updated, and the updated set of centers is returned. Algorithm 2 states formally the steps of the intensification process.

On the other hand, the diversification strategy can develop the exploration process in order to inspect the non-visited regions and create a new solution. It can improve the exploration for search space. The MHTSASM applies diversification by choosing partitions from ASMv with a minimum number of visits.

**Figure 2.** The proposed MHTSASM algorithm framework.

**Algorithm 2:** Intensification Algorithm δ, C, ASM > u, ASMv, d

	- 1.1. Select δ features with highest updating improvement value in ASMu from d data features.
	- 1.2. Select a partition from p partitions for each selected feature with the highest updating improvement value for current center in ASMu.
	- 1.3. Update the value of the selected feature by computing a random value in the range between the current value and the selected partition value.
	- 1.4. Update memory elements ASMv.

The diversification method as shown in Algorithm 3 tends to explore unvisited regions guided by ASMv. It selects a random number of features from d features. Next, the MHTSASM selects a partition with a minimum number of visits for the current center for the selected features. Each feature value is updated with a random value in the range of the selected partition depending on the ASMv information. The memory elements are updated, and the updated set of centers is returned. Algorithm 3 states formally the steps of the diversification process.


#### *3.2. Trial Solutions Generation Algorithm*

The trial solutions generation method as shown in Algorithm 4 generates μ trial solutions near the current set of centers C. It may select the random features for each center and then generate a new random value that belongs to the range of the current value partition. It makes a thorough search for neighbors of the current set of centers C. Algorithm 4 states formally the steps of the trial solutions generation process.

	- 1.1. Set C \$(j) equal to the input centers C.
	- 1.2. Select η features randomly from d data features.
	- 1.3. Repeat steps (1.3.1–1.3.2) for m = 1, . . . , η.
		- 1.3.1. Update the values of the selected features in C \$(j) by generating new values randomly.
		- 1.3.2. Update the memory elements ASMv.
