# Integrated Model Selection and Scalability in Functional Data Analysis Through Bayesian Learning
## 5 Results
### Simulation Results  
In the simulations, we evaluate the functional data analysis performance in terms of model selection, the estimated covariance accuracy, and extendability to multidimensional domains. The model selection metric is the accuracy in estimating the number of principal components, which is the dimension of the compact subspace of signal variations. The configuration of the simulations in this section aligns with that established in [21], covering various scenarios. The simulated datasets are derived from a latent generative model with variables \(\mathcal{Z}_{i}\) with dimension \(r\) for the \(i\)-th sample function and noise corruption with a standard deviation of \(\sigma\): \(Y_{i}=\sum_{j=1}^{r}\bigl{(}Z_{ij}f_{j}(X_{i})\bigr{)}+g(X_{i})+E_{i}\), \(Z_{ij}\sim\mathcal{N}(0,v_{j}),E_{j}\sim\mathcal{N}(0,\sigma^{2}I)\), where \(\{f_{j}\}_{j=1}^{r}\) represent eigenfunctions, \(\{v_{j}\}_{j=1}^{r}\) are the eigenvalues, and \(g:R\mapsto R\) signifies the mean function. Here, we consider five scenarios. **Scenario 1:** Data generated with \(g=5(x-0.6)^{2}\), \(r=3\), \(v=(0.6,0.3,0.1)\), \(\sigma^{2}=0.2\), \(f_{1}(x)=1,f_{2}(x)=\sqrt{2}\sin(2\pi x),f_{3}(x)=\sqrt{2}\cos(2\pi x)\). Here, \(v_{3}<\sigma^{2}\), i.e., the noise has larger variance than the smallest signal. **Scenario 2:** Similar to Scenario 1, but the third eigenfunction is replaced by a function with higher frequencies \(f_{3}(x)=\sqrt{2}\cos(4\pi x)\), and the principal component scores follow a skewed Gaussian mixture model. Specifically, the \(j\)-th component score has a one-in-three probability of following a \(\mathcal{N}(2\sqrt{v_{j}/3},v_{j}/3)\) distribution and a two-in-three probability of following \(\mathcal{N}(-\sqrt{v_{j}/3},v_{j})\), for \(j=1,2,3\). **Scenario 3:** Data generated with \(g=12.5(x-0.5)^{2}-1.25\), \(r=3\), \(v=(4,2,1)\), \(\sigma^{2}=0.5\), \(f_{1}(x)=1,f_{2}(x)=\sqrt{2}\cos(2\pi x),f_{3}(x)=\sqrt{2}\sin(4\pi x)\). **Scenario 4:** Same as Scenario 3, but the component scores are generated from a Gaussian mixture model as in Scenario 2. **Scenario 5:** Data from \(g=12.5(x-0.5)^{2}-1.25\), \(r=6\), \(v=(4,3.5,3.2,5,2,1.5)\), \(\sigma^{2}=0.5\), \(f_{1}(x)=1,f_{2k}(x)=\sqrt{2}\sin(2k\pi x)\) for \(k=1,2,3,f_{2k+1}(x)=\sqrt{2}\cos(2k\pi x)\) for \(k=1,2\), \(j\)-th component score obeying \(\mathcal{N}(0,v_{j})\). In each scenario, the simulations produce 200 sample functions. We investigate three cases with sparse, medium, and dense sampling by assigning the number of observations per sample function \(N_{i}=\{5,10,50\}\). Each case in each scenario is repeated 200 times. The method's performance is compared to that of _fpca_ from [13], the AIC and BIC in the 2022 release of _pace_[11], the modified AIC and BIC in [21], and all the competing methods in [21]. For _fpca_, we set the candidate numbers of basis functions as [8,10,15,20] and the candidate dimensions of the process as [2,3,4,5] for Scenarios 1-4 and [4,5,6,7,8] for Scenario 5. The other parameters are all set to the defaults. Due to its consistent overestimation of the true number of components--likely resulting from interference by correlated noise and less sparse precision priors--we exclude LFRM [18] from further comparisons (see Appendix F.1.1 in the Appendix part). Each estimation uses 10 length scales of functions, which are selected using cross-validation and k-means clustering. This adaptive strategy allows the algorithm to choose distinct length scales at different locations of the definition domain, thereby accommodating varying smoothness characteristics inherent in complex functional data--a level of flexibility that is not possible when using a regular grid that forces a single length scale across the entire domain [18]. Sparse sampling in Scenario 5 uses five length scales to avoid overfitting. Figure 3 shows the length scales and centers of the selected kernel basis functions for three different numbers of sample points, \(N_{i}\), in a random repetition of Scenario 5.