# Diagnosing Schizophrenia Using Effective Connectivity of Resting-State EEG Data
## 2 Materials and Methods
### Machine Learning
In this study, we compare the performance of the five most popular classifiers including Gaussian naive Bayes (GNB), linear discriminant analysis (LDA), \(K\)-nearest neighbors (KNN), support vector machine (SVM), and random forests (RF) using MATLAB R2020a. The choice of these classifiers is based on their effectiveness and simplicity in their implementation. Here, we briefly describe each method. (1) _Gaussian Naive Bayes (GNB)_  
GNB method classifies the new data based on applying [PERSON] theorem with the \"naive\" assumption, where the features are assumed to be independent with Gaussian probability distribution. We used the GNB classifier in our study because of its simplicity and transparency in machine learning modalities [50]. (2) _Linear Discriminant Analysis (LDA)_  
LDA classifier assumes the data samples in each class have Gaussian distribution and the covariance matrices for both classes are the same. As a result, the decision boundary is a linear surface and the LDA predicts the class of a new datum by estimating the probability that it belongs to each class. The class with higher probability is considered the class for the new data. Since the discriminant function is linear, LDA may not be suitable for the non-linearly separable features. Furthermore, this classifier is very sensitive to outliers [51]. (3) _K-Nearest Neighbors (KNN)_  
KNN classifier assigns new data to a specific class if the majority of its \(k\)-nearest neighbors belong to that class within the training set. With a sufficiently high value of \(k\) and enough training data samples, KNN can produce non-linear decision boundaries. KNN is sensitive to the feature vector dimension [52]. However, it is efficient when the dimension of the feature vector is low [53]. 4. _Support Vector Machine (SVM)_  
SVM classifier creates the hyperplanes known as support vectors that maximize the distance (margin) between the two classes by minimizing the SVM cost function, which leads to maximizing the classification accuracy [54]. SVM is a widely employed classifier in EEG data classification (e.g., [15; 16; 18; 20; 24]) because of its high generalization power and relatively good scalability to high-dimensional data. 5. _Random Forests (RF)_  
RF is an ensemble learning algorithm that combines multiple decision trees at the training stage and uses the mode of their outputs (the class that appears most often) as a final class. This powerful learning algorithm first takes \(N\) samples with replacement from the dataset (bootstrapping). It then trains each tree by using a subset of features. Inserting randomness in building RF, makes it robust to the outliers in the database [55]. This method is also widely used for classification based on EEG data (e.g., [21; 22]). In this study, we considered \(k=5\) neighbors for the KNN classifier, and Gaussian radial basis kernel function and the sequential minimal optimization technique [56] for SVM, and 80 decision trees for RF. The fourth step is evaluating the classifiers' performance. Due to the small size of our data sample, we first used the five outer folds of the CN-CV approach in this step to obtain an efficient estimate of classifiers' performances. Then, to further investigate the performance of the proposed method, we evaluated the classifiers' performances with another dataset used in studies [19; 20; 21; 22; 23] that contains 14 SCZs (7 males (50%), age: 27.9 \(\pm\) 3.3 and 7 females (50%), age: 28.3 \(\pm\) 4.1) and 14 HCs (7 males (50%), age: 26.8 \(\pm\) 2.9 and 7 females (50%), age: 28.7 \(\pm\) 3.4 years) collected by the Institute of Psychiatry and Neurology in Warsaw, Poland [57], which is available online at RepOD [58].