## 3 Modeling and Algorithms
### Label Propagation  
After getting the sparse graph and its adjacency matrix \(W\), we can obtain the final prediction result by using the LP algorithm on the obtained graph. As mentioned in Section 2, the main purpose of the LP algorithm is to transfer labels from the labeled samples to unlabeled samples, and during this process, a prediction matrix will be generated. Furthermore, the generated prediction resultsshould meet the basic assumption of LP algorithm that similar samples should have similar labels. The mathematical way of achieving the purpose of the LP algorithm is to define an energy function \(E(f)\) with a given graph and to minimize the function \(E(f)\).  
\[E(f)\ =\ \frac{1}{2}\sum_{i,j}W_{ij}\|f_{i}-f_{j}\|^{2} \tag{8}\]  
where \(f_{i}\), \(f_{j}\) are respectively the predicted label vectors of the i-th and j-th data samples. \(f\) is composed of all the predicted label vectors. The matrix \(W\) is the adjacency matrix of the graph needed for the LP process.  
In order to maintain the experimental consistency with the original PCSSR paper, we follow the formula of LP algorithm used in the original PCSSR paper. The full explanation and the adapted formula are detailed as follows.  
The labeled samples are expressed as \(X_{l}=[x_{1},x_{2},\ldots,x_{l}]\), and a large number of unlabeled samples \(X_{u}=[x_{l+1},x_{l+2},\ldots,x_{l+u}]\). There are total \(C\) classes denoted as \(C=\{1,2,\ldots,c\}\). Let \(n=l+u\) be the total number of data samples, and usually, the value \(l\) is much smaller than \(u\). The matrix \(W\in\mathbb{R}^{n\times n}\), the adjacency matrix of graph \(G\) which can be obtained from the PCSSR process, implies the similarity or the connection between each two samples. Next, we define a label matrix \(Y_{l}\) with \(l\) rows, where each row \(Y_{l\in}\in\mathbb{R}^{1\times c}\) is a one-hot vector representing the class that the corresponding labeled sample \(x_{i}\) belongs to. \(F\in\mathbb{R}^{m\times c}\) is the prediction matrix, of which each element \(F_{ij}\) represents the probability of the i-th sample belonging to the j-th class; \(F_{l}\in\mathbb{R}^{l\times c}\) is the upper \(l\) rows of \(F\), while \(F_{u}\in\mathbb{R}^{l\times c}\) is the lower \(u\) rows of \(F\).  
\[\underset{F\in\mathbb{R}^{m\times c}}{\text{min}}\frac{1}{2}\sum\
olimits_{i, j=1}^{N}W_{ij}\|f_{i}-f_{j}\|^{2}=Tr\Big{(}F^{T}L_{W}F\Big{)}\text{ s.t. }F_{l}=Y_{l}, \tag{9}\]  
where the expression after \(min\) can be viewed as the energy function; \(f_{i}\in\mathbb{R}^{1\times c},f_{j}\in\mathbb{R}^{1\times c}\) are the predicted label vector of the data sample \(x_{i},x_{j}\). \(L_{w}=D-W\) is the Laplacian matrix where \(D\) is a diagonal matrix, and \(D_{ii}=\sum\limits_{j}W_{ij}\).  
Then we split \(L_{W}\) into 4 blocks by the number of labeled and unlabeled samples:  
\[\left(\begin{array}{cc}L_{W_{2}}&L_{W_{lu}}\\ L_{W_{ul}}&L_{W_{un}}\end{array}\right)\]  
Finally, we get the prediction matrix that records the possibility of each unlabeled sample belonging to each class:  
\[F_{u}=-L_{W_{uu}}^{-1}L_{W_{ul}}Y_{l}, \tag{10}\]  
The final prediction result for every unlabeled sample is given by:  
\[y_{i}=arg\underset{j=1,2,\ldots,c}{\text{max}}F_{u}(i,j),i=1,2,\ldots,u \tag{11}\]  
where \(y_{i}\) denotes the class that the unlabeled sample \(i\) is most likely to belong to.