# Robust Bilinear Probabilistic Principal Component Analysis
## 4 Numerical Examples  
In this section, we conduct several numerical examples based on synthetic problems and three real-world data sets to demonstrate the effectiveness of our proposed RBPPCA algorithm. All experiments were run by using MATLAB (2016a) with machine epsilon \(2.22\times 10^{-16}\) on a Windows 10 (64 bit) Laptop with an Intel Core i7-8750H CPU (2.20 GHz) and 8 GB memory. Each random experiment was repeated 20 times independently, then the average numerical results were reported. **Example 1** (Experiments on the synthetic data). : _In this example, we only compare ours with the BPPCA algorithm [12] to illustrate the significant improvement of the RBPPCA algorithm. We take \(N\) data matrices \(X_{n}\) for \(n=1,\ldots,N\) with \(N=200\) and \(d_{c}=d_{r}=64\), \(N_{g}\) of which are generated by_  
\[X_{n}=CZ_{n}R^{\mathrm{T}}+W+C\mathcal{E}_{r_{n}}+\mathcal{E}_{c_{n}}R^{ \mathrm{T}}+\mathcal{E}_{n},\quad n=1,\ldots,N_{g},\]  
_where \(C\), \(R\) and \(W\) are simply synthesized by MATLAB as_  
\[C=\mathrm{eye}(d_{c},q_{c}),\ R=\mathrm{eye}(d_{r},q_{r}),\ W=\mathrm{rand}(d_ {c},d_{r})\text{ with }q_{c}=q_{r}=8,\]  
\(Z_{n}\)_, \(\mathcal{E}_{r_{n}}\), \(\mathcal{E}_{c_{n}}\) and \(\mathcal{E}_{n}\) are sampled from matrix variate normal distributions \(\mathcal{N}_{q_{c},q_{c}}(0_{q_{c}\times q_{r}},1_{q_{c}},I_{q_{r}})\), \(\mathcal{N}_{q_{c},d_{r}}(0_{q_{c}\times d_{r}},I_{q_{c}},\sigma_{t}^{2}I_{d_ {r}})\), \(\mathcal{N}_{d_{c},q_{r}}(0_{d_{c}\times q_{r}},\sigma_{c}^{2}I_{d_{r}},I_{q_{ r}})\), and \(\mathcal{N}_{d_{c},d_{r}}(0_{d_{c}\times d_{r}},\sigma_{c}^{2}I_{d_{c}},\sigma_ {r}^{2}I_{d_{r}})\) with \(\sigma_{c}=\sigma_{r}=1\), respectively. The other \(N_{o}\) data matrices, i.e., \(X_{n}\) for \(n=N_{g}+1,\ldots,N\), are regarded as outliers of which each entry is sampled from the uniform distribution over the range of 0 to 10. In order to demonstrate the quality of computed approximations \(C^{\odot}\) and \(R^{\odot_{g}}\), we calculate the arc length distance between the two subspaces \(\mathrm{span}(R\otimes C)\) and \(\mathrm{span}(R^{\odot_{g}}\otimes C^{\odot_{g}})\), which is used in [12] and defined as_  
\[\arcsin\Big{(}\Big{\|}(I_{d_{c},d_{r}}-QQ^{\mathrm{T}})Q^{(i)}\Big{\|}_{2} \Big{)}, \tag{31}\]  
_to monitor the numerical performance of the RBPPCA and BPPCA method, where \(\mathrm{span}(R\otimes C)\) and \(\mathrm{span}(R^{\odot_{g}}\otimes C^{\odot_{g}})\) are the column space of \(R\otimes C\) and \(R^{\odot_{g}}\otimes C^{\odot_{g}}\), respectively, and \(Q\) and \(Q^{(i)}\) are the orthogonal base matrices of \(\mathrm{span}(R\otimes C)\) and \(\mathrm{span}(R^{\odot_{g}}\otimes C^{\odot_{g}})\), respectively. In fact, by ([28], Definition 4.2.1), the computational result of (31) is the largest canonical angle between the estimated subspace \(\mathrm{span}(R^{\odot_{g}}\otimes C^{\odot_{g}})\) and the true \(\mathrm{span}(R\otimes C)\)._  
In this test, we start with \(C^{\odot_{g}}=\mathrm{rand}(d_{c},q_{c})\), \(R^{\odot_{g}}=\mathrm{rand}(d_{r},q_{r})\), \(\sigma_{c}^{\odot_{g}}=1\), \(\sigma_{r}^{\odot_{g}}=1\) and \(\
u^{\odot_{g}}=1\), then consider the effect of the ratio of outliers, i.e., \(N_{o}/N\), which is varied from 0 to 30% with a stride length of 10% in this example. In these cases, the estimated values of \(\
u\) are all \(\
u=1\). If we use other initial values \(\
u^{\odot_{g}}\) here, the computed \(\
u\) also converges to one as iterations increase. The corresponding numerical results of arc length distances are plotted in Figure 1. Figure 1 shows that the RBPPCA and BPPCA methods almost perform with the same convergence behavior when the data matrices are without outliers. As the ratio of outliers goes to 30%, it is reasonable that more iterations are required for the RBPPCA method to achieve a satisfactory accuracy. Unlike the BPPCA method, the presented RBPPCA method is more robust to outliers because the arc length distances of the BPPCA method are always held to approximately 1.5 when the data includes outliers.