# Diagnosing Schizophrenia Using Effective Connectivity of Resting-State EEG Data
## 2 Materials and Methods
### Eeg-Ste  
TE measures the directional information flow between two incidents (data), without assuming any particular model for them, which is especially relevant for detecting the direction of information flow for non-linear interactions with unknown structural information [28; 29]. However, estimating the transition probabilities from raw data is not trivial. One solution for this issue is STE. STE transforms the raw data with continuous time series and therefore distribution into symbolic sequences with discretized symbols to simplify the calculation of probability distributions [35]. Here, we briefly describe the STE procedure.  
Consider two random processes X = (\(x_{1}\), \(x_{2}\),..., \(x_{N}\)) and Y = (\(y_{1}\), \(y_{2}\),..., \(y_{N}\)), where \(x_{i}\) and \(y_{i}\) are the \(i\)th samples that are obtained from two regions of the brain. Symbolic transfer entropy (STE) estimates the transfer of information between X and Y with a symbolization process. In this method, first for a given \(i\), \(m\) amplitude values \(X_{i}\) = {\(x_{i}\); \(x_{i\ +d}\);...; \(x_{i\ +(m-1)d}\)} are arranged in an ascending order \(X_{i}^{a}\) = {\(x_{i+(k_{1}-1)d}\) < \(x_{i+(k_{2}-1)d}\) < \(\ldots\) < \(x_{i+(k_{m}-1)d}\)}, where \(m\) is the embedding dimension, which shows the length of the segments in random processes to be compared, and \(d\) is the time delay sample. \(X_{i}^{a}\) is then transformed into a sequence of discretized symbols, \(\hat{X}_{i}\) = {\(k_{11}\); \(k_{i2}\)... ; \(k_{m}\)}, where \(k_{ij}\), \(j\) = 1, 2, \(\ldots\)\(m\) are the indexes of original elements of \(X_{i}^{a}\). Knowing the two symbol sequences, \(\hat{X}_{i}\) and \(\hat{Y}_{i}\), STE is then calculated as [35].  
\[T_{Y,X}^{S}=\sum p(\hat{X}_{i+t},\hat{X}_{i},\hat{Y}_{i})\log_{2}\frac{p(\hat{ X}_{i+t}|\hat{X}_{i},\hat{Y}_{i})}{p(\hat{X}_{i+t}|\hat{X}_{i})}, \tag{1}\]  
where \(p\) denotes the transition probability density, the sum runs over all symbols and \(t\) denotes a time step. We used the EEGapp pipeline [43] to calculate the STE between every two electrodes. In this app, firstly, the 3.5-min EEG signal was divided into 21-time segments of 10 s. Then, for each segment, the STE value was computed for a set of \(d\) values (\(d\) = 1:2:30) and the embedding dimension of \(m\) = 3. The maximum value of STE is then selected as the STE between two electrodes, which corresponds to the correct time delay between them. The average of selected STEs among all 21-time segments is then considered as the final STE between two electrodes. This results in 380 STE values for each subject, {STE\({}_{1,2}\), STE\({}_{1,3}\), STE\({}_{1,4}\),...,STE\({}_{1,20}\), STE\({}_{2,1}\), STE\({}_{2,3}\),..., STE\({}_{19,20}\)}, where STE\({}_{ij}\) measures the directed flow of information from the \(i\)th to the \(j\)th EEG electrode at each frequency band of \(\delta\) (1-4 Hz), \(\theta\) (4-8 Hz), \(\alpha\) (8-13 Hz), \(\beta\) (13-30 Hz), and \(\gamma\) (30-50 Hz). Therefore, the total number of features for all 5 frequency bands is \(N_{\rm c}\) = 380 \(\times\) 5 = 1900 for each subject.