# Cortical Connectivity Response to Hyperventilation in Focal Epilepsy: A Stereo-EEG Study
## 3 Methods
### Connectivity Analysis  
Afterwards, we compute the Hilbert Transform (HT), obtaining the analytic representation \(\mathcal{X}_{a}(t)=x(t)+HT(x(t))\) of each window \(x(t)\in\mathcal{N}(t)\). The values \(\mathcal{X}_{a}(t)\) are associated with an _instantaneous phase_\(\phi_{x}(t,\tau)\), where \(\tau\) is the time index of the window samples [24]. Also in this case, we model the instantaneous phase distribution \(\phi_{x}(t)\) as a histogram, choosing the bin number according to the Sturges rule. Practically, each bin \(\varphi\in\Phi\) includes a phase range lasting \(2\pi/(log_{2}(n)+1)\) radians, where \(n=1000\) is the number of signal samples associated with each window. Hence, we compute the entropy of \(\phi_{x}(t)\) as  
\[H(\phi_{x}(t))=-\sum_{\varphi\in\Phi}p_{\varphi}(\phi_{x}(t))\text{log}(p_{ \varphi}(\phi_{x}(t))), \tag{4}\]  
where \(p_{\varphi}(\phi_{x}(t))\) represents the probability that \(\phi_{x}(t)\) takes values in the phase range associated with \(\varphi\). Despite being computed in different domains, \(H(\phi_{x}(t))\) has a similar meaning to \(H(\theta_{x}(t))\) and tends to increase as \(x(t)\) obtains more complex patterns.  
The instantaneous phase distribution is also used for describing the relations within the different channels \(x\in\mathcal{N}\) in time [25]. To this goal, we consider the PTE algorithm, which, given a couple of channels \(x,y\in\mathcal{N}\), estimates the influence that each of the channels exerts on the network [14]. The algorithm takes as input the instantaneous phase distribution \(\phi_{x}(t)\) and \(\phi_{y}(t)\) of \(x(t)\) and \(y(t)\) and estimates the amount of information in \(\phi_{x}(t)\) that can be used to predict the future evolution of \(\phi_{y}(t)\). Specifically, the value of the PTE between \(x(t)\) and \(y(t)\), considering a lag \(\delta\), is obtained by  
\[\begin{split} PTE_{x\to y}(t,\delta)=H\big{(}\phi_{y}(t),\phi_{y}(t+ \tau)\big{)}+\\ H\big{(}\phi_{x}(t),\phi_{y}(t)\big{)}-H\big{(}\phi_{x}(t),\phi_{y}(t ),\phi_{y}(t+\tau)\big{)}-H\big{(}\phi_{y}(t)\big{)},\end{split} \tag{5}\]  
where \(H(\cdot)\) denotes both the entropy and the mutual entropy function.  
We recall that \(PTE_{x\to y}(t,\delta)\) is an effective connectivity measure, which means that, in general, \(PTE_{x\to y}(t,\delta)\
eq PTE_{y\to x}(t,\tau)\)[26]. The value \(PTE_{x\to y}(t,\delta)\) depends on the lag \(\delta\), i.e., the time distance at which the information transfer is estimated. To remove the dependency from \(\delta\), we redefine the PTE between \(x(t)\) and \(y(t)\) as the maximum value of \(PTE_{x\to y}(t,\tau)\) among multiple lags:  
\[PTE_{x\to y}(t)=\max_{\delta\in\{0,\dots,\delta_{max}\}}PTE_{x\to y}(t,\tau), \tag{6}\]  
where we set \(\delta_{max}=100\) ms. By doing so, the magnitude of the effective connection exerted on the channel \(y\) by the channel \(x\) at time \(t\) is given by \(PTE_{x\to y}(t)\), while the propagation delay associated with such a connection is  
\[\delta_{x\to y}(t)=\operatorname*{arg\,max}_{\delta\in\{0,\dots,\delta_{max}\} }PTE_{x\to y}(t,\delta). \tag{7}\]