## 2 Materials and Methods
### Directional Connectivity  
Functional connectivity algorithms typically use a linear mapping between two connections, leading to symmetrical connectivity matrices between EEG channels [25]. However, there is no guarantee that there will be abnormal connections in both directions equally between two brain regions [26]. To compute directional connectivity, we can assume that an asymmetrical linear operator \(H\) has been multiplied with zero-mean sources \(W\) that form the measured signals. Then, assuming the lack of instantaneous feedback between the received signals, the power spectral matrix of these signals can be decomposed, having components of \(H\) (a transfer function) and diagonal covariance matrix of \(W\), which is \(\sum\) as shown in Equation (1) [25], where the superscript \(H\) means the Hermitian operator:  
\[S(f)=H{\sum H^{H}} \tag{1}\]  
To compute this asymmetrical \(H\) matrix, we suppose a multivariate autoregressive (MVAR) model for the received signals to find a correlation pattern between values of a \"cause\" source to later values of its \"effect\" (similar to that in Granger causality). In this way, a time series \(y(n)\) with \(L\) samples can be modeled by a causal MVAR of order \(p\):  
\[\left[ \begin{array}{c}y_{1}\ (n)\\ \vdots\\ y_{M}\ (n)\end{array} \right]=\sum_{r=1}^{p}A_{r}\left[ \begin{array}{c}y_{1}\ (n-r)\\ \vdots\\ y_{M}\ (n-r)\end{array} \right]+\left[ \begin{array}{c}w_{1}\ (n)\\ \vdots\\ w_{M}\ (n)\end{array} \right] \tag{2}\]  
where \(w=\left[ \begin{array}{cc}w_{1}&\cdots&w_{M}\end{array} \right]^{T}\) are the assumed white noise vector with zero mean and a diagonal covariance matrix with nonzero elements equal to \(\left\langle ww^{T}\right\rangle=diag\big{\{}\lambda_{kk}^{2}\big{\}}\). The \(A_{r}\) matrix elements are equal to the linear delay between two channels at a specific delay. For instance, \(m\)-th row and \(n\)-th column element, \(a_{mn}^{r}\), is the \(r\)-th delay between channel \(m\) (cause) and channel \(n\) (effect) [27]. There can be two time-variant and time-invariant cases that the latter one forces \(A_{r}\) elements' values to be dependent on the time. Taking the \(Z\)-transform of both sides of Equation (2), the time-varying case \(A_{r}\) can be computed by an algebraic equation (as shown in Equation (3), where \(Z\)[25] means the \(Z\)-transform of a function or matrix). The frequency components of \(H\) can be computed by utilizing the correspondence of \(z=e^{j2\pi f}\) between the Fourier and \(Z\) transforms. The \(A(n\), \(f)\) matrix is related to the power component in each time and frequency bin:  
\[ \begin{array}{c}HZ\{W\}=\left(\sum_{r=1}^{p}A_{r}(n)z^{-r}\right)Z\{W\}+Z \{W\}{\Rightarrow}\ A(n,f)=\text{I}-\\ \sum_{r=1}^{p}A_{r}(n)z^{-r}\Big{|}_{z=\text{e}^{j2\pi f}};\ H(z,n)=A^{-1}(n,f) \end{array}  \tag{3}\]  
Partial directed coherence (PDC) is a technique to compute directional connectivity in the frequency domain:  
\[\left|\ \widetilde{\pi}_{kl}(n,f)\right|\triangleq\frac{\left|A_{kl}(n,f) \right|}{\sqrt{\sum_{k}\left|A_{kl}(n,f)\right|^{2}}} \tag{4}\]Equation (4) implies that the PDC from channel \(l\) to \(k\) is the ratio of in the \(k\)-th series due to the past of the \(l\)-th series. This method, based on a frequency picture of Granger causality, utilizes directional connection to compute the strength of the causal link between channels. In this manner, the null-hypothesis for Granger causality is no connection from \(l\)-th to \(k\)-th region (\(H_{0}\): \(\widetilde{\pi}_{kl}(n,f)=0\)) [28]. Unfortunately, PDC as typically written has two major disadvantages. First, it is not scale-invariant, i.e., if one of the signals is amplified by a constant value and its spectral representation is unchanged, then the value of PDC is reduced [29]. To overcome this issue, each power component in Equation (4) can be divided by the related element in the cross-covariance matrix to obtain an estimate for general partial directed coherence (gPDC). Another drawback of the PDC is its sensitivity to volume conduction effects.