# Research and Application of Semi-Supervised Category Dictionary Model Based on Transfer Learning
## 2 Materials and Methods
### Migration Strategy  
In the context of the semi-supervised transfer learning scenario, given that the target domain contains a limited number of labeled samples, the disparity between the source and the target domain can be bridged in each category subspace. Aiming at minimizing the sum of distances, a strong connection is established for the corresponding sparse coefficients of labeled samples in the source and target domains. \[ \begin{split}\hat{\Theta}_{m}=\frac{1}{N_{m}^{t}N_{m}^{t,l}}\sum \limits_{i=1}^{N_{m}^{t,u}}\sum\limits_{j=1}^{N_{m}^{t,u}}\|s_{i,m}^{s}-s_{j,m} ^{t,l}\|_{2}^{2}\\ =tr\left[\frac{L_{ij}}{2}\sum\limits_{i=1}^{N_{m}^{u}+N_{m}^{t,l} }\sum\limits_{j=1}^{N_{m}^{t,u}}\left(s_{i,m}-s_{j,m}\right)\left(s_{i,m}-s_{ j,m}\right)^{T}\right]\end{split}  \tag{3}\]  
where,  
\[L_{ij}= \begin{cases}\frac{1}{\left(N_{m}N_{m}^{t,l}\right)},s_{i,m}\in\mathbb{ S}_{m}^{s},s_{j,m}\in\mathbb{S}_{m}^{t,l}\\ \frac{1}{\left(N_{m}^{t,l}N_{m}^{t,l}\right)},s_{j,m}\in\mathbb{S}_{m}^{s},s_ {i,m}\in\mathbb{S}_{m}^{t,l}\\ 0,\hskip 56.905512 pt\textit{others}\end{cases}  \tag{4}\]  
\(\mathbb{S}_{m}^{s}\) and \(\mathbb{S}_{m}^{t,l}\) denote the sparse representation coefficients generated from the source domain, target domain labeled samples, respectively. For ease of mathematical computation, Equation (3) can be further simplified to:  
\[\hat{\Theta}_{m}=\frac{1}{2}tr\left(\hat{S}_{k,m}\hat{\mathcal{L}}_{m}^{\circ }\hat{S}_{k,m}^{T}\right) \tag{5}\]  
\[\hat{\mathcal{L}}_{m}^{\circ}=L_{d,m}-L_{m}\ \textit{,}\ L_{d,m}=diag\left(l_{1}, \ldots,l_{N_{m}^{t,u}+N_{m}^{t,l}}\right)\ \textit{is a diagonal matrix with diagonal elements}\ \textit{ equating to the sum of elements in each column of the }\ \textit{L}_{d,m}\ \textit{ matrix}\ \hat{\mathcal{L}}_{m}^{\circ}\ \textit{can be considered a Laplacian matrix produced by a symmetric matrix, and \hat{S}_{k,m}=\left[S_{m}^{s}\ \mathbb{S}_{m}^{t,l}\right]\). When the value of \(\hat{\Theta}_{m}\) is small, it signifies that similar samples in the source and target domains are geometrically closer, thereby reducing the differences between domains. However, this full linkage presents strong constraints, and when the selected pseudo-tagged samples in the target domain are incorrectly tagged, it can adversely impact the entire model. Further, it may be beneficial to search for information that aids domain migration from the augmented data matrix \(\widetilde{X}_{k,m}^{t,u}\) within the target domain, to expand the range of sample applicability within the target domain. In this study, considering the sparse representation coefficients generated by aligning the source domain and target domain sample data in the conditional probability sense, the corresponding mathematical expressions are:\[ \begin{split}&\tilde{\Theta}_{k,m}=\ \left|\ \big{|}\ \frac{1}{N_{m}^{\text{s}}}\sum_{i=1}^{N_{m}^{\text{s}}}s_{i,m}^{s}-\frac{1}{ N_{m}^{\text{s}}+N_{m}^{\text{s}}}\left(\sum_{j=1}^{N_{m}^{\text{s}}l}s_{j,m}^{l}+ \sum_{j=1}^{N_{m}^{\text{s}}l,u}s_{j,m}^{l,u}\right)\ \right|^{2}\\ &=tr\left[\begin{array}{c}\frac{1}{N_{m}^{\text{s}}}\sum_{i=1}^ {N_{m}^{\text{s}}}s_{i,m}^{s}-\frac{1}{N_{m}^{\text{s}}+N_{m}^{\text{s}}l^{ \text{s}}}\left(\sum_{j=1}^{N_{j}^{\text{s}}l}s_{j,m}^{l,l}+\sum_{j=1}^{N_{j}^ {\text{s}}l,u}s_{j,k,m}^{l,u}\right)\\ \left(\frac{1}{N_{m}^{\text{s}}}\sum_{i=1}^{N_{m}^{\text{s}}}s_{i,m}^{s}-\frac {1}{N_{m}^{\text{s}}+N_{m}^{\text{s}}}\left(\sum_{j=1}^{N_{j}^{\text{s}}l}s_{ j,m}^{l,u}+\sum_{j=1}^{N_{j}^{\text{s}}l}s_{j,k,m}^{l,u}\right)\right)\end{array} \right]^{2}\\ \end{split}  \tag{6}\]  
To facilitate the calculation, it is defined that \(S_{k,m}=\left[S_{m}^{s}\ S_{m}^{t,l}\ S_{m}^{t,u}\right]\). With this definition, the aforementioned equation can be reformulated as follows:  
\[\tilde{\Theta}_{k,m}=tr\big{(}S_{k,m}\tilde{\mathcal{L}}_{k,m}S_{k,m}^{T}\big{)} \tag{7}\]  
where,  
\[\tilde{\mathcal{L}}_{k,m}=\left\{