# Integrated Model Selection and Scalability in Functional Data Analysis Through Bayesian Learning
## Appendix C Scalable Update for BSFDA
### Scale Parameters  
Here, we state the theorems that justify the use of updating rules for \(\mathcal{Q}^{(a)}{}_{\alpha_{j}}\) based on \(\mathcal{L}^{(a)}\) to update \(\mathcal{Q}_{\alpha_{j}}\) (and, similarly, \(\mathcal{Q}^{(a)}{}_{\beta_{k}}\) for \(\mathcal{Q}_{\beta_{k}}\), \(\mathcal{Q}^{(a)}{}_{\eta}\) for \(\mathcal{Q}_{\eta}\)), and it does maximize \(\mathcal{L}\) ultimately. []  
According to Equations (A34) and (A35), if \((j>J^{(a)})\) or \((k>K^{(a)})\), either \(\mathbb{E}_{\mathcal{Q}}[\alpha_{j}]=\epsilon^{-1}\) or \(\mathbb{E}_{\mathcal{Q}}[\beta_{k}]=\epsilon^{-1}\), respectively. In the limit as \(\epsilon\to 0\), using Equation (22) and the block matrix inversion formula, we obtain  
\[\Sigma_{W_{jk}} \leftarrow\lim_{\epsilon\to 0}\Biggl{(}\biggl{(}\mathbb{E}_{ \mathcal{Q}_{/W_{jk}}}[\text{diag}(\beta)\otimes\text{diag}(\alpha)+\sigma^{-2 }\sum_{i}\Bigl{(}(\
abla_{i})\otimes(Z_{i}^{\mathsf{T}}Z_{i})\Bigr{)}\Bigr{)} \biggr{)}^{-1}\Biggr{)}_{[j+kM,j+kM]}\] \[=\lim_{\epsilon\to 0}\biggl{(}\Bigl{(}\mathbb{E}_{\mathcal{Q}_{/W_{ \epsilon}}}[\alpha_{j}\beta_{k}]\Bigr{)}^{-1}+\mathcal{O}(\epsilon^{2})\biggr{)} =\Bigl{(}\mathbb{E}_{\mathcal{Q}_{/W_{\epsilon}}}[\alpha_{j}\beta_{k}]\Bigr{)} ^{-1}=\frac{b_{\alpha_{j}}b_{\beta_{k}}}{a_{\alpha_{j}}a_{\beta_{k}}}\] (A39)In the limit as \(\epsilon\to 0\) and using Equation (23),  
\[\mu_{W_{jk}} \leftarrow\lim_{\epsilon\to 0}\Biggl{(}-\frac{a_{\sigma}}{b_{\sigma}} \sum_{i}\text{vec}\bigg{(}\Big{(}\[PERSON]_{i}(\mu_{Z}\Phi_{i}-Y_{i})^{T}\mu_{Z_{i}} \Big{)}^{T}\bigg{)}^{T}\Sigma_{\text{vec}\,(W)}\Biggr{)}_{[1,j+kM]}\] \[=\Biggl{(}-\frac{a_{\sigma}}{b_{\sigma}}\sum_{i}\text{vec}\bigg{(} \Big{(}\Phi_{i}(\mu_{Z}\Phi_{i}-Y_{i})^{T}\mu_{Z_{i}}\Big{)}^{T}\bigg{)}^{T} \Biggr{)}\Bigl{(}\Sigma_{\text{vec}\,(W)}\Bigr{)}_{.(j+kM)}\in\mathcal{O}(\epsilon) \tag{23}\]  
Equation (23) uses the fact that elements in \(\Bigl{(}\Sigma_{\text{vec}\,(W)}\Bigr{)}_{. (j+kM)}\) are all \(\mathcal{O}(\epsilon)\) based on the block matrix inversion formula. Thus,  
\[\lim_{\epsilon\to 0}\mathbb{E}_{\mathcal{Q}}[W_{jk}^{2}] =\lim_{\epsilon\to 0}\Bigl{(}\Sigma_{W_{jk}}+(\mu_{W_{jk}})^{2} \Bigr{)}=\lim_{\epsilon\to 0}\Bigl{(}\Sigma_{W_{jk}}+\mathcal{O}(\epsilon^{2}) \Bigr{)}\] \[=\lim_{\epsilon\to 0}\Biggl{(}\frac{b_{a_{j}}b_{\xi_{k}}}{a_{a_{j}}a _{\beta_{k}}}+\mathcal{O}(\epsilon^{2})\Biggr{)}=\frac{b_{a_{j}}b_{\beta_{k}}} {a_{a_{j}}a_{\beta_{k}}} \tag{24}\]  
\(\square\)  
**Lemma A6**. : \(\forall k>K^{(a)}\)_, after updating \(\mathcal{Q}_{Z_{B}}\) by Equations (20) and (21), \(\mathbb{E}_{\mathcal{Q}}[\tilde{Z}_{k}^{2}]=\frac{b_{\gamma}}{a_{q}}\epsilon\)._  
Proof. : If \(k>K^{(a)}\), \(\mathbb{E}_{\mathcal{Q}}[\beta_{k}]=\epsilon^{-1}\). Then, using Equation (20) and the block matrix inversion formula, we have  
\[\Sigma_{Zkk} \leftarrow\lim_{\epsilon\to 0}\Biggl{(}\bigg{(}\mathbb{E}_{ \mathcal{Q}_{Z_{Z}}}\Bigl{[}\sum_{i=1}^{p}\Bigl{(}\sigma^{-2}\Psi_{i}\Bigr{)} +\eta\,\text{diag}(\beta)\Bigr{]}\bigg{)}^{-1}\Biggr{)}_{kk}\] \[=\lim_{\epsilon\to 0}\Biggl{(}\biggl{(}\sum_{i=1}^{p}\Bigl{(} \frac{a_{\sigma}}{b_{\sigma}}\Psi_{i}\Bigr{)}+\frac{a_{q}}{b_{q}}\,\text{diag }(\frac{a}{b})\bigg{)}^{-1}\Biggr{)}_{kk}\] \[=\lim_{\epsilon\to 0}\Biggl{(}\frac{b_{p}b_{\beta_{k}}}{a_{q}a _{\beta_{k}}}+\mathcal{O}(\epsilon^{2})\Biggr{)}=\frac{b_{p}b_{\beta_{k}}}{a _{q}a_{\beta_{k}}} \tag{25}\]  
Using Equation (21),  
\[\mu_{\tilde{Z}k} \leftarrow\lim_{\epsilon\to 0}\Biggl{(}\bigg{(}\mathbb{E}_{ \mathcal{Q}_{Z_{Z}}}\Bigl{[}\sigma^{-2}\Bigr{]}\sum_{i=1}^{p}(Y-\mathbb{E}_{ \mathcal{Q}_{Z_{Z}}}[Z_{i}W]\Phi_{i})\Phi_{i}^{T}\bigg{)}\Sigma_{\tilde{Z}} \Biggr{)}_{1k}\] \[=\lim_{\epsilon\to 0}\biggl{(}\Bigl{(}\mathbb{E}_{\mathcal{Q}_{/W_{ \epsilon}}}[\alpha_{j}\beta_{k}]\Bigr{)}^{-1}+\mathcal{O}(\epsilon^{2})\biggr{)} =\Bigl{(}\mathbb{E}_{\mathcal{Q}_{/W_{\epsilon}}}[\alpha_{j}\beta_{k}]\Bigr{)} ^{-1}=\frac{b_{\alpha_{j}}b_{\beta_{k}}}{a_{\alpha_{j}}a_{\beta_{k}}}\]0  
Equation (26) uses the fact that elements in \(\Sigma_{\tilde{Z}\,k}\) are all \(\mathcal{O}(\epsilon)\).