## 3 Proposed Method
### Dataset and Preprocessing
#### 3.2.3 Feature Extraction  
In our model, our fragment sampling adopts the method of [12; 17], that is, 50% overlapping sampling of the data is performed to obtain the sampled data \(x_{Z}\in\mathbb{R}^{2f}\), where f is the sampling frequency, and then this fragment is used for feature extraction. In terms of the five extracted time-domain features, the average describes the amplitude of the EEG data, and the average formula is as follows: \(x_{avg}=\frac{1}{2f}\sum_{i=1}^{2f}x_{i}\). To avoid inaccuracies of the average value due to the occurrence of its waveform integral area of 0, the rectified average value is used as follows: \(x_{avg}=\frac{1}{2f}\sum_{i=1}^{2f}|x_{i}|\). To describe the stability of the data, the standard deviation feature is used as \(x_{std}=\sqrt{\frac{1}{2f}\sum_{i=1}^{2f}(x_{i}-x_{avg})^{2}}\), and the peak-to-peak value describes the difference between peak and valley: \(x_{p-p}=max_{i\in[1,2f]}x_{i}-min_{i\in[1,2f]}x_{i}\).  
The cross frequency \(x_{cross}=\frac{\sum_{i=1}^{2f-1}1(x_{i}x_{i+1}<0)}{2f}\)is used to show the frequency of the EEG data and the time-domain features are \(F^{time}=\left\{x_{avg},x_{are},x_{std},x_{p-p},x_{cross}\right\}\in\mathbb{R}^ {5}\). As for frequency domain features, based on time-domain frequency energy conservation, \(E=\int_{-\infty}^{\infty}x_{T}^{2}(t)dt=\frac{1}{2\pi}\int_{-\infty}^{\infty} \left|X_{T}(\omega)\right|^{2}d\omega\). By simplification, the power spectrum is obtained as \(P(\omega)=\lim_{T\rightarrow\infty}\frac{\left|X_{T}(\omega)\right|^{2}}{2}\). Since our sampling is not continuous, the discrete Fourier transform \(X(k)=F[x(n)]=\sum_{n=0}^{N-1}x(n)e^{-jk2\pi n/N}\) is adopted. The power spectral density is then given as \(p(k)=\frac{\left|X(k)\right|^{2}}{N}\). When k is taken in the interval [0, 127], the power spectral density feature of the 128 samples \(F^{PSD}\in\mathbb{R}^{128}\) is obtained. Combined with the frequency bands present in epileptic EEG, such as \(\delta\) wave (0.5-4 Hz), \(\theta\) wave (4-7 Hz), \(\alpha\) wave (7-15 Hz), \(\beta\) wave (15-31 Hz), and \(\gamma\) wave (>31 Hz), the average power spectral density of these five bands is \(F^{psdband}\in\mathbb{R}^{5}\). Fourier transform can only solve the frequency of EEG signal but not the time period of corresponding frequency. Short-time Fourier transform can solve this problem. However, since its principle is based on adding a window mechanism to divide the EEG data on the basis of Fourier transform, the problem of window length selection also arises. If the window length is too short, the frequency resolution will be reduced due to too few data points. If it is too long, the time resolution will be reduced, and it will degenerate into a Fourier transform. Fortunately, the wavelet transform can solve this problem well. Similar to Fourier transform, in the transformation process, the wavelet function multiplies the signal function, and then the product is integrated as \(CWT_{X}^{\overline{\mathbf{v}}}(\tau,s)=\frac{1}{\sqrt{s}}\int_{-\infty}^{ \infty}x(t)\Psi(\frac{t}{s}-\tau)dt\). Here, the mother wavelet function is given by \(\Psi^{*}(\tau,s)=\frac{1}{\sqrt{s}}\Psi(\frac{t}{s}-\tau)\), in which \(\tau\) controls the phase of the wavelet function; s controls the frequency of the wavelet function; and \(\frac{1}{\sqrt{s}}\) controls the energy conservation before and after the transformation. When s is taken in the interval [2; 128], the energy of the 127 sampled data is obtained as a feature \(F^{CWT}\in\mathbb{R}^{127}\), and the average energy of the five bands is calculated to obtain \(F^{cutband}\in\mathbb{R}^{5}\). Combined with the time domain feature, the time frequency domain feature is obtained as follows: \(F^{fine}=[F^{time},F^{PSD},F^{psdband},F^{CWT},F^{cutband}]\in\mathbb{R}^{270}\). The input structure of the graph convolutional neural network is \(X\in\mathbb{R}^{C*T*F}\), in which R represents dimension space; C is the number of channels; T is the time period, and F is the number of features.