## 5 Transfer Learning-Assisted Dynamic Evolutionary Algorithm
### Transfer Learning-Assisted Initial Population Generation
refers to the matrix trace; **W** denotes the transformation matrix; \(\textbf{K}=\phi(\textbf{X})^{T}\)\(\phi(\textbf{X})\in\mathbb{R}^{(m+n)\times(m+n)}\) represents the kernel matrix; **X** denotes the data matrix composed of source and the target domain samples; and **M\({}_{0}\)** and **M\({}_{c}\)** are MMD matrices, and their definitions can be found in [PERSON] et al. (2018). Based on Formula (25), finding the optimal feature transformation can be formalised as the following optimisation problem:  
\[ \begin{array}{ll}\underset{\textbf{W}}{\text{arg min}}&\text{MMD}(D_{s},D_{t })+\lambda\cdot\textbf{tr}(\textbf{W}^{\text{T}}\textbf{W})\\ \text{s.t.}&\textbf{W}^{\text{T}}\textbf{K}\textbf{H}\textbf{K}^{\text{T}} \textbf{W}=\textbf{I},\ \ 0\leq\mu\leq 1\end{array}  \tag{26}\]  
In the optimisation problem (26), the second term of the objective function is a regularisation term. The first constraint limits the scatter matrix to maintain the data characteristics of the source and the target domain sample sets. **H** is the centring matrix, and **I** is the identity matrix. Problem (26) can be solved by generalised eigenvalue decomposition, and the obtained optimal transformation matrix **W** is composed of the first \(d\) smallest eigenvectors of the result matrix **R**. **R** is given by Formula (27). \[\textbf{R}=(\textbf{K}\Bigg{(}(1-\mu)\textbf{M}_{0}+\mu\sum_{c=0}^{1}\textbf{ M}_{c}\Bigg{)}\textbf{K}^{\text{T}}+\lambda\cdot\textbf{I})^{-1}\textbf{K} \textbf{H}\textbf{K}^{\text{T}} \tag{27}\]  
The details of the feature transformation learning are shown in Algorithm 2. ```
Input: Source and target sample set \(D_{s}\) and \(D_{t}\); kernel function \(\kappa\). Output: Feature transformation matrix **W**. 1: Obtain the class labels of the sampled data in \(D_{s}\) and \(D_{t}\) by using the hierarchical Pareto nondominated sorting method;
2: Construct **K**, **M\({}_{0}\)**, **M\({}_{c}\)**, **H**, and **I**;
3: Build **W** by using the \(d\) smallest eigenvectors of **R**;
4:return W;
```  
**Algorithm 2** K-BDA  
Furthermore, we use the knowledge contained in the POF of the source domain to find some solutions expected to perform well in the target domain in the latent space, which is used to construct the initial population of the subsequent evolutionary algorithm. The process of knowledge transfer is as follows: first, the mapping set in the latent space corresponding to the POF of the source domain is calculated. A single-objective evolutionary algorithm is used to find a solution in the target domain for each mapping solution in the mapping set so that it is closest to the mapping solution in the latent space. Next, the initial population is constructed based on the solutions found and the target domain sample set \(D_{t}\). The details of the initial population generation are shown in Algorithm 3. ```
Input: Source and target sample set \(D_{s}\) and \(D_{t}\); kernel function \(\kappa\). Output: Feature transformation matrix **W**. 1: Obtain the class labels of the sampled data in \(D_{s}\) and \(D_{t}\) by using the hierarchical Pareto nondominated sorting method;
2: Construct **K**, **M\({}_{0}\)**, **M\({}_{c}\)**, **H**, and **I**;
3: Build **W** by using the \(d\) smallest eigenvectors of **R**;
4:return W;
```  
**Algorithm 3** differs from [PERSON] et al. (2018) in two aspects. First, the D-HRDLB problem is a combinatorial optimisation problem with an irregular POF, and the quality of the sample set has a significant impact on subsequent transfer learning. Therefore, different from the latter random sampling, an MOEA-based sampling approach is adopted in our study. Second, the latter does not consider the influence of the conditional distribution of the samples on transfer learning. When the environmental change is small and the source and target domain sample sets are relatively similar, the conditional distribution is more critical for transfer learning. Therefore, this study considers the marginal and conditional distributions in the sample set simultaneously.