## 2 Materials and Methods
### Graph Modelling of Functional Brain Networks
#### 2.3.1 Graphs Adjacency Matrices  
FC patterns were estimated using the correntropy with a Gaussian kernel [40]. The correntropy can be regarded as a generalized correlation function that can account for nonlinearities in the recorded time series [40]. Hence, since the brain can be considered as a non-linear dynamic system [41], and since EEG exhibits important non-linear characteristics [42], we chose to use this measure for computing similarities between the recorded time series of each pair of electrodes. Moreover, a recent application of correntropy to study classification scenarios of hands MI tasks showed that this measure was able to capture the expected spatial patterns of MI, while also performing better in terms of classification, when compared to other types of correlation metrics (namely, Pearson and Spearman correlations) [43]. Furthermore, even though other nonlinear approaches have been proposed to deal with these issues in the EEG signal, correntropy can be directly applied to the recorded data and, thus, generally becomes simpler and easier to compute [44]. We briefly  
Figure 2: Illustrative diagram of the methodological steps: the recorded EEG time-series are analyzed in one-second windows, with the corresponding correntropy between sensors being computed. Next, subject-specific adjacency matrices are built based on binarization thresholds related to the strength of functional links and to the their persistence across the data recordings. Finally, our analyses encompass two approaches: one, at the group level, aims at determining changes in FC patterns common to all subjects; and the other, at the participant level, has as goal to characterize changes in the graphs’ topology through specific metrics. describe the steps in the correntropy calculation in our study, below. A more through and mathematically formal discussion on correntropy can be found in [40; 44]--the latter especially concerning its application to EEG FC studies. Consider the recorded EEG signals represented by \(\mathbf{X}^{(w)}(t)=\{x_{1}(t),x_{2}(t),...,x_{d}(t)\}^{(w)}\), with a total of \(d\) channels and \(N\) data points, for each sample \(t\) in time window \(w\). Let us omit the indice \(w\) in the quantity \(\mathbf{X}^{(w)}(t)\), for notation simplicity, and define a _correntropy matrix_\(V_{w}[\tau]\) for a given lag \(\tau\) as such [40; 43]:  
\[V_{w}[\tau]=E[\kappa(\mathbf{X}(t),\mathbf{X}(t+\tau))]. \tag{1}\]  
In Equation (1), the operator \(E[\kappa(x,y)]\) denotes the expected value over the kernel function \(\kappa(x,y)\). Note that \(V_{w}[\tau]=\{v_{i,j}^{(w)}(\tau)\}_{dxd}\) is a matrix in which each element \(v_{i,j}^{(w)}(\tau)\) denotes the correntropy coefficient between sensors \(i\) and \(j\), from a total of \(d\) sensors, for a specific lag value. As mentioned, we worked with a Gaussian kernel [40], as follows:  
\[\kappa(x,y)=\frac{1}{\sqrt{2\pi\sigma}}e^{-\frac{(|x-y|^{2})}{2\sigma^{2}}}, \tag{2}\]  
with \(\sigma\) being an adjustable parameter related to the kernel size. The kernel function produces a mapping of each vector \(\mathbf{X}(n)-\mathbf{X}(n-\tau)\) over a sphere in the feature space and, in practice, its application computes a distance between the two vectors [40]. In our study, we set \(\sigma=(\sqrt{2\pi})^{-1}\), such that \(\kappa(x,x)=1\). This would mean that maximum similarity of \(1\) is found when considering time series of the same electrode. Values for \(V_{w}[\tau]\) in Equation (1) can be estimated through [40; 43]:  
\[V_{w}[\tau]=\frac{1}{N-\tau+1}\sum_{n=\tau+1}^{N}\kappa(\mathbf{X}(n),\mathbf{ X}(n-\tau)), \tag{3}\]  
which is simply the mean of the application of the kernel function over all samples \(n\), within the studied time window, for lag \(\tau\). To remain in the domain of functional connectivity, as no information regarding directionality of interactions and causality was needed (which would implicate _effective connectivity_ instead [45]), we set \(\tau=0\).