## 5 Simulation Analysis
### Analysis of T-Gane  
In this subsection, how to generate the datasets is firstly presented. Next, the values of BIC used for determining the number of GMM components and the estimated PDFs derived from the datasets are described. Finally, the probabilities and the optimal threshold, i.e., \(P_{\text{MS}}\), \(P_{\text{FA}}\), \(P_{\text{Err}}\), and \(\hat{\gamma}\) mentioned in (31)-(34) are shown. In order to generate the datasets (\(E_{\text{NN}}^{\text{data}}\) and \(E_{\text{NS}}^{\text{data}}\)), the parameters--especially the range of arrival angle of signals (\(\theta_{\text{min}}\) and \(\theta_{\text{max}}\)) and the minimum angle difference between two adjacent signals (\(\Delta\theta_{ab}\)) as shown in Figure 3--should be set; \(\Delta\theta_{ab}\) is defined as  
\[\Delta\theta_{ab}=|\theta_{a}-\theta_{b}|\quad(a\
eq b). \tag{35}\]  
Figure 2: Numerical analysis of AREG. (**a**) the eigenvalues; (**b**) the gaps of eigenvalues; (**c**) the means of the accumulated gaps of eigenvalues; (**d**) the values of AREG. From our experiences, the NS gap is extremely small even at a high SNR when the arrival angle of a signal is too oblique (e.g., \(-80^{\circ}\) or \(80^{\circ}\)) or when the angle difference between two adjacent signals is small (e.g., \(5^{\circ}\) for \(\Delta\theta_{ab}\)). Generally, source enumeration and DOA estimation suffer from these extremely oblique impinging on ULA or high-resolution problems; but these problems are out of scope for this study, and those special situations probably degrade the learning performance of T-GANE because they will be outliers of the datasets. Therefore, the values of \(\theta_{\min}\), \(\theta_{\max}\) and \(\Delta\theta_{ab}\) should be limited when the datasets are generated. The parameters are set as follows:  
Parameter Settings for Generation the Datasets
* Number of elements of ULA \(M\) is 7. * Distance of the two adjacent elements \(\xi\) is \(\eta/2\). * Number of signal sources \(D\) ranges from 1 to 6 (uniform random). * Arrival angle of signals \(\theta_{i}\) (\(i=1,\dots,D\)) ranges from \(\theta_{\min}=-60^{\circ}\) to \(\theta_{\max}=60^{\circ}\) (uniform random, non-discrete). * Minimum angle difference between the two adjacent signals \(\Delta\theta_{ab}\geq 15^{\circ}\). * Number of snapshots \(L\) is 1000. * SNR ranges from \(-20\) dB to \(10\) dB (uniform random, non-discrete). * Number of situations for generating the datasets \(Q\) is 100,000. Each situation, number of signal sources \(D\), arrival angle of signals \(\theta_{i}\) (\(i=1,\dots,D\)), and SNR are randomly selected subject to the parameter settings. From this simulation, 252,249 NN gaps and 100,000 NS gaps data are obtained. After generating \(E_{\rm NN}^{\rm data}\) and \(E_{\rm NS}^{\rm data}\) according to the parameter settings, Algorithm 1 with \(K^{\rm max}=100\) is executed to obtain the GMM parameters. Figure 4 shows the values of BIC versus the number of GMM components \(K\); Panels (a) and (b) of Figure 4 show the results for \(E_{\rm NN}^{\rm data}\) and \(E_{\rm NS}^{\rm data}\), respectively. Both results show that the value of BIC rapidly decreases for small K, then gradually increases for large \(K\). Although there are some fluctuations of the BIC values in the results of panel (b), the smallest BIC values can be found; 6 for \(E_{\rm NN}^{\rm data}\) and 33 for \(E_{\rm NS}^{\rm data}\). Figure 3: The range of arrival angle of signals and the angle difference between the two adjacent signals. Figure 5 shows \(f_{\rm NN}(x)\) and \(f_{\rm NS}(x)\) obtained by Algorithm 1. Additionally, the visualization of (31) and (32) is also shown in Figure 5. As mentioned in Section 4.2.2, if a gap value is smaller than or equal to the threshold, then the gap is decided as the NN gap; the left-side of \(f_{\rm NS}(x)\) is mistaken for NN gaps. Otherwise, if a gap value is greater than the threshold, then the gap is decided as an NS gap; the right side of \(f_{\rm NN}(x)\) is mistaken for NS gaps.