## 3 Methods
### Class-Specific Dictionary Learning  
In this paper, the sub-dictionary of each class target will be built by the dictionary learning method, and these dictionaries can also be called class-specific dictionaries. For the targets of class \(i\), its training set is \(Y_{i}=\left\{y_{i}^{1},y_{i}^{2},\ldots,y_{i}^{N-1},y_{i}^{N}\right\}\), where \(y_{i}^{j}\) represents the \(j-th\) sample in \(Y_{i}\) and \(N\) denotes the number of samples. The process of dictionary learning can be represented by Equation (4). \[\min_{D_{i},X_{i}}\{\left\|Y_{i}-D_{i}X_{i}\right\|_{2}+\lambda\|X_{i}\|_{1}\} \tag{4}\]  
In Equation (4), \(X_{i}=\{x_{i}^{1},x_{i}^{2},\ldots,x_{i}^{N}\}\) represents the sparse coefficient matrix of \(Y_{i}\) under dictionary \(D_{i}(D_{i}=\{d_{i}^{1},d_{i}^{2},\ldots,d_{i}^{d_{i}}\})\), and \(n_{i}\) indicates the number of atoms in dictionary \(D_{i}\). \(\lambda\) is the weight factor. The dictionary learning process is completed by alternately updating \(D_{i}\) and \(X_{i}\). The conventional dictionary learning methods only focus on the reconstruction performance and rarely consider the discriminative properties of sparse coefficients, which is not conducive to the classification task. To address this problem, here, we draw on the idea of _FDDL_ and add constraints during dictionary learning. There are two ways to enhance the classification ability of dictionaries: (1) increasing inter-class differences, (2) reducing intra-class differences. We adopt the class-specific dictionary learning strategy and do not introduce information of other classes, so we can only reduce intra-class differences in this paper. In this case, the objective function of class-specific dictionary learning can be expressed as Equation (5). \[\min_{D_{i},X_{i}}\Big{\{}\left\|Y_{i}-D_{i}X_{i}\right\|_{F}^{2}+\lambda_{1} \cdot\left\|X_{i}\right\|_{1}+\lambda_{2}\cdot f(X_{i})\Big{\}}\ s.t.\ \left\|d_{i}^{k} \right\|_{2}=1 \tag{5}\]  
Here, \(f(X_{i})\) represents the intra-class difference, and \(\lambda_{1}\) and \(\lambda_{2}\) are weight factors to balance sparsity and intra-class divergence. For class-specific dictionary, intra-class differences can be reduced by minimizing the intra-class divergence of the sparse coefficient matrix \(X_{i}\). This process can be expressed as  
\[\min_{X_{i}}f(X_{i})=\ \min_{X_{i}}\biggl{\{}\sum_{j=1}^{N}\left(x_{i}^{j}-m_{i }\right)\left(x_{i}^{j}-m_{i}\right)^{T}\biggr{\}},\ x_{i}^{j}\in X_{i} \tag{6}\]  
Figure 2: Schematic diagram of our proposed method. In Equation (6), \(m_{i}\) is the mean vector of \(X_{i}\), and \(m_{i}=\sum_{j=1}^{N}x_{i}^{j}/N\). We build the matrix \(M_{i}\) with the same size as \(X_{i}\), and make its column vectors all be \(m_{i}\). Therefore, \(f(X_{i})=\left\|X_{i}-M_{i}\right\|_{F}^{2}\), and Equation (5) can be rewritten as  
\[\min_{D_{i}X_{i}}\Big{\{}\ \left\|Y_{i}-D_{i}X_{i}\right\|_{F}^{2}+\lambda_{1} \cdot\left\|X_{i}\right\|_{1}+\lambda_{2}\cdot\left\|X_{i}-M_{i}\right\|_{F}^{ 2}\Big{\}}\ s.t.\ \left\|d_{i}^{k}\right\|_{2}=1 \tag{7}\]  
Equation (7) needs to optimize \(D_{i}\) and \(X_{i}\). We adopt the alternating optimization strategy; that is, fixed \(D_{i}\) optimizes \(X_{i}\), and then fixed \(X_{i}\) optimizes \(D_{i}\). First, fix \(D_{i}\) to optimize \(X_{i}\). When dictionary \(D_{i}\) is fixed, the objective function is equivalent to  
\[\underset{X_{i}}{\text{min}}f(X_{i})=\ \underset{X_{i}}{\text{min}}\left\{ \sum_{j=1}^{N}\left(x_{i}^{j}-m_{i}\right)\left(x_{i}^{j}-m_{i}\right)^{T} \right\}\text{, }x_{i}^{j}\in X_{i} \tag{8}\]  
Equation (8) can be solved according to the projection iteration method to obtain the sparse representation coefficient matrix \(X_{i}\). Second, fix \(X_{i}\) and optimize \(D_{i}\).