## 4 Optimization Strategy and Classification
### Optimization Strategy of LPLC-HDL
#### 4.1.2 Class-Specific Dictionary Learning  
Assuming the variables \((D_{0},L_{0},Z_{0})\) are fixed, the objective function (4) for learning the class-specific dictionary can be formulated as follows. \[ \begin{split}\min_{D_{p},Z_{p}}&\sum_{i=1}^{C} \Bigg{\{}\|X^{\prime\prime}_{i}-D_{p}Z^{i}_{p}\|_{F}^{2}+\lambda\|P_{i}Z^{i}_{ p}\|_{F}^{2}+\gamma\Big{(}\|Z^{i}_{p}\|_{F}^{2}+Tr\big{(}Z^{i}_{p}L_{i}Z^{ \mathrm{T}}_{p}\big{)}\Big{)}\Bigg{\}},\\ & s.t.\ \|d^{i}_{p}\|_{2}^{2}=1,\ (l=1,2,\cdots,K_{p}),\end{split}  \tag{16}\]  
where \(X^{\prime\prime}_{i}=X_{i}-D_{0}Z^{i}_{0}\). To update the variables \((D_{p},Z_{p})\), we follow the iterative scheme presented in Section 4.1.1, i.e., updating \(D_{p}\) by fixing \(Z_{p}\); then updating \(Z_{p}\) by fixing \(D_{p}\). The updating steps are elaborated as below. (c) Update the class-specific dictionary \(D_{p}\)  
By fixing the variable \(Z_{p}\), the optimization of dictionary \(D_{p}\) can be simplified as the optimization of each atom \(d^{k}_{p}\ (k=1,2,\cdots,K_{p})\). Provided \(k\in\mathcal{S}_{i}\) and the other atoms in \(D_{p}\) are fixed, to update the atom \(d^{k}_{p}\) we can solve the optimization problem as follows. \[\min_{d^{k}_{p}}\ \|X^{\prime\prime}-\sum_{t\
otin\mathcal{S}_{i}}d^{t}_{p}z^{ t}_{p}-\sum_{t\in\mathcal{S}_{i},t\
eq k}d^{t}_{p}z^{t}_{p}-d^{k}_{p}z^{k}_{p}\|_{F}^{2}, \tag{17}\]  
where \(X^{\prime\prime}=\sum_{i=1}^{C}X^{\prime\prime}_{i}\), and \(z^{t}_{p}\) denotes the \(t\)th row vector of coefficient matrix \(Z_{p}\). By introducing a variable \(\bar{E}=X^{\prime\prime}-\sum_{t\in\mathcal{S}_{i}}d^{t}_{p}z^{t}_{p}-\sum_{t \in\mathcal{S}_{i},t\
eq k}d^{t}_{p}z^{t}_{p}\), the solution of atom \(d^{k}_{p}\) can be easily derived as  
\[\tilde{d}^{k}_{p}=\frac{1}{\|z^{t}_{p}\|_{2}^{2}}\bar{E}z^{\mathrm{T}}_{p}. \tag{18}\]  
Consider the energy of each atom as being constrained in (16), the solution can be further normalized as  
\[\tilde{d}^{k}_{p}=\frac{\bar{E}z^{\mathrm{T}}_{p}}{\|\bar{E}z^{\mathrm{T}}_{p} \|_{2}}. \tag{19}\]  
Because the atoms with indices out of \(\mathcal{S}_{i}\) are fixed when updating the atoms with indices in \(\mathcal{S}_{i}\), we can compute \(E=X^{\prime\prime}-\sum_{t\
otin\mathcal{S}_{i}}d^{t}_{p}z^{t}_{p}\) in advance and take it into the calculation of \(\hat{E}\) to accelerate the update. Likewise, we successively update the atoms corresponding to \(\mathcal{S}_{i}\) with \((i=1,2,\cdots,C)\) and obtain the overall class-specific dictionary \(D_{p}\). (d) Update the particularity representation \(Z_{p}\)  
For the particularity representation of the \(i\)th class \(Z_{p}^{i}\), the optimization problem depending on it becomes  
\[\min_{Z_{p}^{i}}\|X_{i}^{\prime\prime}-D_{p}Z_{p}^{i}\|_{F}^{2}+\lambda\|P_{i} Z_{p}^{i}\|_{F}^{2}+\gamma\Big{(}\|Z_{p}^{i}\|_{F}^{2}+\mathit{Tr}\big{(}Z_{p}^{i}L _{i}Z_{p}^{i\,\mathrm{T}}\big{)}\Big{)}. \tag{20}\]  
The solution of the above equation can be obtained by computing each code in \(Z_{p}^{i}\) as follows  
\[ \begin{split}\min_{z_{p}^{i}(n)}&\|x_{i}^{\prime \prime}(n)-D_{p}z_{p}^{i}(n)\|_{2}^{2}+\lambda\|P_{i}z_{p}^{i}(n)\|_{2}^{2}+ \gamma\|z_{p}^{i}(n)\|_{2}^{2}\\ &+\gamma\sum_{n_{1},n_{2}}L_{i}(n_{1},n_{2})z_{p}^{i}(n_{2}) \mathsf{T}z_{p}^{i}(n_{1}),\end{split}  \tag{21}\]  
where \(x_{i}^{\prime\prime}(n)\)\((n=1,2,\cdots,N_{i})\) is the \(n\)th training sample of the \(i\)th class, \(z_{p}^{i}(n)\) is the code of \(x_{i}^{\prime\prime}(n)\) and \(L_{i}(n_{1},n_{2})\) denotes the \((n_{1},n_{2})\)th entry of matrix \(L_{i}\). Since all the terms in Equation (21) are based on the quadratic form, the solution of \(z_{p}^{i}(n)\) can be easily obtained by setting its derivation to zero.