# Transfer Learning Based on Clustering Difference for Dynamic Multi-Objective Optimization
## 3 Proposed TCD-DMOEA
### Processing of Target Domain  
The output of the target domain processing stage is the predicted population. The purpose of generating predicted population is to reduce the possibility of negative transfer in subsequent transfer learning. According to the characteristics of transfer learning, negative transfer can be improved by increasing the amount of effective source domain knowledge or reducing the data distribution difference between neighbors. Through the clustering difference strategy, the characteristics of the source domain and the target domain data are first extracted to reduce the difference between the data, and then the knowledge transfer is performed. At the same time, the population quality is improved through the clustering difference strategy to increase the amount of effective source domain knowledge. In the dynamic environment, the objective function changes with time, but there is a certain relationship between the two objectives before and after the change. Therefore, the optimal solution information before the change can be used to predict the distribution of the next solution. First, the population is divided into five categories using the k-means algorithm, and the centroids of these five categories are calculated separately. Then, the first-order difference is used to predict the next corresponding centroid, and these centroids are formed into a predicted population. Figure 3 shows the process of prediction of clustering differential strategies. Algorithm 3 gives the pseudo code of target domain processing. The basic principle of K-means algorithm is: assuming a given data sample \(X\), contains \(n\) objects \(X=\{X_{1},X_{2},X_{3},\ldots,X_{n}\}\), each of these objects has \(m\)-dimensions attributes. The goal of the K-means algorithm is to cluster \(n\) objects into a specified \(k\)-class cluster based on similarity between objects. Each object belongs to only one of the class clusters with the smallest distance to the center of the class cluster. For K-means, \(k\) cluster centers \(\{C_{1},C_{2},C_{3},\ldots,C_{k}\},1<k\ \leq\ n\) need to be initialized first; the Euclidean distance from each object to the center of each cluster is calculated as shown in the following Formula (5):  
\[dis(X_{i},C_{j})=\sqrt{\sum_{t=1}^{\overline{m}}{(X_{it}-C_{jt})^{2}}} \tag{5}\]  
In the above equation, \(X_{i}\) represents the \(i\)-th object \(1\ \leq\ i\ \leq\ n\), \(C_{j}\) represents the center of the \(j\)-th cluster \(1\ \leq\ j\ \leq\ k\), \(X_{it}\) represents the \(t\)-property of the \(i\)-th object, \(1\ \leq\ t\ \leq\ m\), \(C_{jt}\) represents the \(t\)-th attribute of the \(j\)-th cluster center. The distance from each object to each cluster center is compared sequentially, and the objects are assigned to the cluster of the nearest cluster center, resulting in \(k\) class clusters \(\{\ S_{1},S_{2},S_{3},\ldots,S_{k}\}\). The K-means algorithm defines the prototype of the class cluster with the center, which is the average of all objects in the class cluster in each dimension, and its calculation process is shown in Formula (6):  
\[C_{t}=\frac{\sum_{X_{i}\in S_{i}}X_{i}}{|S_{i}|} \tag{6}\]  
where \(C_{l}\) represents the center of the \(l\)-th cluster, \(1\ \leq\ l\ \leq\ k\), \(S_{l}\) represents the number of objects in the \(l\)-th class cluster, \(X_{i}\) represents the \(i\)-th object in the \(l\)-th class cluster, \(1\ \leq\ i\ \leq|S_{i}|\). The population is divided into five categories according to the K-means principle above, and the centroid \({C_{i}}^{T}(i=1,2,\ldots,5)\) of each cluster is calculated after clustering. The first-order differences are then used to derive the centroids \({C_{i}}^{T}(i=1,2,\ldots,5)\) of each cluster at the next moment. \(P_{T}\) is the DPS obtained by the time window \(T\), then \({C_{i}}^{T}\) can be calculated by the following Formula (7):  
\[{C_{i}}^{T}=\frac{1}{|P_{T}|}\sum_{x\in P_{T}}x \tag{7}\]  
Figure 3: Classification of clustering dynamics.