# Principal Subspace of Dynamic Functional Connectivity for Diagnosis of Autism Spectrum Disorder
## 3 Material and Method
### Functional Connectivity (FC) of BOLD Time-Series Signals
#### 3.2.2 Dynamic FC Using Wavelet Coherence (WC)  
For dynamic FC (DFC), wavelet coherence (WC) is a nonlinear estimator used to determine functional connectivity between brain areas using time-frequency components of neuroimaging signals [20; 32]. Based on the [PERSON] et al. [33] method, the WC can be calculated by first extracting the time-frequency components from each BOLD signal using the continuous wavelet transform (CWT). As given in Equation (3), the CWT coefficient is defined as the convolution of the BOLD signal \(x(t)\) with the scaled and translated form of a mother wavelet \(\psi_{a,b}(t)\).  
\[CWT(a,b)=\frac{1}{\sqrt{a}}\int_{-\infty}^{\infty}x(t)\psi^{*}\bigg{(}\frac{t -b}{a}\bigg{)}dt, \tag{3}\]  
where \(a\) is the wavelet scale, \(b\) is the location, and \({}^{*}\) indicates the complex conjugate [34]. The Morlet wavelet is used as the mother wavelet because it has the best ratio (1.03) between frequency band and wavelet scale, which facilitates the understanding of data in the frequency domain [35]. CWT is emerging as an important method in biosignal analysis due to its ability to extract useful information from non-stationary signals [36; 37]. Further, WC, which is based on CWT, characterizes coherence measures between two signals on different time scales and does not require assumptions about the stationarity of the input signals. As a result, CWT provides a good balance between time and frequency components.  
The next step is to calculate the joint power of the BOLD signal pair \(x\), \(y\) at different scales \(a\) and times \(b\) using the following equation  
\[C_{xy}(a,b)=S(C_{x}^{*}(a,b)C_{y}(a,b)), \tag{4}\]where \(C_{x}(a,b)\) and \(C_{y}(a,b)\) respectively denote the CWT of \(x\) and \(y\) at scales \(a\) and positions \(b\), the superscript \(\star\) is the complex conjugate, and \(S\) is smoothing in time and scale. Then, the WC between \(x\) and \(y\) is calculated by  
\[WC_{xy}=\frac{\mid C_{xy}(a,b)\mid^{2}}{(S\mid C_{x}(a,b)\mid^{2})(S\mid C_{y}( a,b)\mid^{2})} \tag{5}\]  
The WC is a 2D matrix, \(WC\in\mathbb{R}^{TP_{t}\times F}\), and the matrix coefficient is denoted as \(wc_{t,f}\), where \(t=1,2,...,TP_{t}\) is the number of time points, and \(f=1,2,...,F\) is the number of frequency scales based on wavelet decomposition at low frequency fluctuation (LFF) (0.01-0.08 Hz). The matrix represents the time-frequency components of the coherence between pairs of BOLD signals, with each row reflecting the coherence of a particular pair of brain nodes \(x\) and \(y\) across time \(t\). The column of the \(WC\) matrix represents 37 frequency bands spaced equally from 0.01 Hz to 0.08 Hz; hence \(F=37\). The values of time points \(TP_{t}\) for each rs-fMRI dataset are listed in Table 1.  
For example, Figure 2 illustrates the 145-length BOLD signal pairs selected from a subject of the CALTECH dataset. As can be seen in Figure 2, the coherence values of the signal pairs range between 0 and 1. These values indicate the similarity between \(x(t)\) and \(y(t)\) at different phases. As defined by [PERSON] et al. (2018), the phase difference in wavelet coherence is from \(x(t)\) over \(y(t)\) at scales \(a\) and positions \(b\) is  
\[\phi_{xy}=\tan^{-1}\frac{\Re(C_{xy}(a,b))}{\Im(C_{xy}(a,b))} \tag{6}\]  
where \(\Re(C_{xy}(a,b))\) is the real part, and \(\Im(C_{xy}(a,b))\) is the imaginary part of \(C_{xy}(a,b)\). A phase difference of zero means that there is no coherence between the signals. When \(\phi_{xy}\in(0,\frac{\pi}{2})\), the BOLD signals are coherently in-phase, with the first signal \(x(t)\) lagging the second signal, \(y(t)\), whereas when \(\phi_{xy}\in(-\frac{\pi}{2},0)\), \(x(t)\) leads \(y(t)\). When \(\phi_{xy}\in(-\pi,-\frac{\pi}{2})\), the BOLD signals are in anti-phase with \(x(t)\) lagging \(y(t)\), and when \(\phi_{xy}\in(\frac{\pi}{2},\pi)\), \(x(t)\) leads \(y(t)\). The arrows in Figure 2 indicate this behavior of the phase differences between the signals.