1 Introduction

Worldwide, around 50 million people are suffering from epileptic seizures as per the reports of World Health Organization. 80% patients are residing in low income or middle-income countries [1]. During seizure attack, a person may result in serious injury as the brain loses control over the body (partially or fully). Being a brain disease, a highly skilled neurologist is required for proper diagnosis and cure. Generally, clinicians use EEG readings for the diagnosis. EEG shows electrical activity of the brain and it is recorded using 10–20 system by placing electrodes on the human scalp [2]. EEG has several advantages over other recording techniques such as it is non-invasive, temporal resolution is high, and has robust nature. To diagnose epilepsy by visual inspection of EEG is an error-prone, tedious and time-consuming job. So, a computer-aided diagnostic (CAD) system can assist the neurologists in recognizing the patients having seizures.

Researchers have applied numerous features extraction techniques and classifiers to make a CAD system using the whole frequency spectrum of EEG signals [3,4,5]. From the past three years, research groups are focusing on implementing deep learning models [6]. The major drawback of the reported techniques is that these don’t discuss the physiological aspect of seizures related to different bands. In [7], the authors reported individual frequency band yields more relevant and accurate details about the seizure activity. In the previous work, authors have presented the suitability of alpha band (8–12 Hz) for epileptic seizure detection using t–f statistical features [8].

Slow waves (< 4 Hz) has been always of prime importance for the detection of focal epilepsy [9]. In [10], authors have presented interictal regional delta slowing (IRDS) as an EEG biomarker for temporal epilepsy detection. In [11], authors reported postoperative delta activity can be used as a diagnostic marker for recurrent seizures. Above mentioned research works haven’t used machine learning methods on delta band for epileptic seizure detection. The rhythmicity of the electrical pulses generated in the human brain varies from seizure to non-seizure situation, which results in a change of statistical parameters in these states. This paper has used STFT to extract four t–f statistical features (mean, variance, skewness and kurtosis) of delta band. All four statistical features are input to RF classifier. Different window functions have been studied to check the suitability of delta band.

This paper is framed as: Sect. 2 discusses the dataset used, feature extraction and classification. In Sect. 3, results have been discussed, and conclusions drawn from the work are given in Sect. 4. Figure 1 shows the steps followed in this work to make a CAD system for the detection of seizures.

Fig. 1
figure 1

Flowchart of the work consisting of four important steps: t–f analysis, extraction of frequency band, feature extraction and classification

2 Method

2.1 Datasets Used

Dataset 1 The first publicly available EEG database used in this work is developed by the University of Bonn, Germany [12]. This database has five EEG groups denoted as Z-healthy subjects with eyes open, O-healthy subjects with eyes closed, N-subjects with epilepsy (interictal state) taken from opposite to epileptogenic zone, F-subjects with epilepsy (interictal state) taken within epileptogenic zone and S-subjects with epilepsy (ictal state) taken within epileptogenic zone. Each group consists of 100 single-channel segments, sampled at 173.61 Hz with 12 bits of resolution. Duration of one segment is of 23.6 s.

Dataset 2 This database is developed by Neurology and Sleep Centre, New Delhi, India from ten epilepsy patients at a sampling rate of 200 Hz with a spectral bandwidth of 0.5–70 Hz [13]. 10–20 electrode placement system was used to record the EEG. This whole database is collected using Comet AS40 amplification system and has three types of groups, viz. ictal, interictal and pre-ictal. Every group has fifty EEG segments in. MAT format. Each segment has 1024 data points and duration of 5.12 s.

2.2 Feature Extraction from EEG Data

EEG signals possess non-stationary characteristics, so applying Fourier Transform (FT) may mislead the results about spectral properties of the signals. To obtain correct spectral information of EEG signals, STFT technique can be performed. This paper deals with the STFT technique for the t–f analysis of EEG data. In STFT, signal is divided into small frames by multiplying with window functions, and FT is calculated of each one. It results in localization of frequency in time and vice versa.

STFT can be calculated by the following expression (1):

$${Y}_{STFT} \left(\tau ,f\right)= \underset{-\infty }{\overset{\infty }{\int }}x\left(t\right)h(t-\tau ){e}^{-j2\pi ft}dt$$
(1)

where \(x\left(t\right)\) is EEG signal; \(h(t)\) is a window function with centre at \(\tau \) and of size odd (N/4), where N indicates the number of data points. \(Y\) is a transformation function mapping time domain into t–f plane. After applying STFT on time-series EEG data, four statistical features of delta band is extracted as reported by the authors in [8]. During seizures the oscillations in the brain get changed, hence statistical features are of great importance [14].

2.3 Classification

To investigate the performance of extracted t–f statistical features of the delta band, Random Forest (RF) classifier have been taken into consideration. The authors have reported the classifier in [8, 15]. The major reason of RF robustness is the strong ensemble learning capacity with various decision trees. The cause to choose RF follows the claim in [16], which presented RF as the best classifier among 179 classifiers, after evaluating on 121 datasets of UCI and other real problems.

3 Results and Discussions

The main aim of the experiments proposed in this work is to detect the epileptic seizures using only the delta band. Nine experiments using the first dataset and three experiments using the second dataset have been performed. The feature vector set is divided using tenfold cross-validation (CV) method to evaluate the reliable performance of the classifiers. Five different window functions (Hamming, Hanning, Blackman, Gauss and Kaiser) have been used to perform STFT operation [17]. The performance of the delta band has been analyzed using metrics such as classification accuracy, sensitivity and specificity, as below:

$$\mathrm{Accuracy}= \frac{\mathrm{TP}+\mathrm{TN}}{\mathrm{TP}+\mathrm{FN}+\mathrm{TN}+\mathrm{FP}} \times 100\%$$
(2)
$$\mathrm{Sensitivity}=\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FN}} \times 100\%$$
(3)
$$\mathrm{Specificity}= \frac{\mathrm{TN}}{\mathrm{TN}+\mathrm{FP}} \times 100\%$$
(4)

where TP = True Positive, TN = True Negative, FP = False Positive, FN = False Negative.

The performance metrics for five windows of delta band is listed in Table 1. From the table, it can be seen that except Hamming, all other window functions gives 100% accuracy, specificity and sensitivity between ictal (S) and healthy (Z) class on the features extracted from the delta band. In another experiment between ictal (S) and healthy (O) class, Hanning and Gauss window gives an accuracy of 99%. In next experiment ictal (S) class is classified with combined segments of both groups of healthy persons (Z–O). To fix the imbalanced data cluster Adaptive synthetic sampling (ADASYN) approach is used [18]. Hanning window gives maximum of 99% accuracy for interictal (N) and ictal (S) class while 94% for interictal (F) and ictal (S) class. Among three clusters (ZO-NF-S) classification, maximum of 98.15% sensitivity has been achieved using Kaiser window. The maximum difference in accuracy among different window functions is only 0.6% which shows the robustness of features of delta band between seizures and healthy persons. For dataset 2, 100% accuracy, sensitivity and specificity has been achieved in all window functions between ictal and interictal.

Table 1 Performance metrics (in %) of delta band for different window functions

Table 2 shows the performance metrics of other frequency bands (theta, alpha and beta) for both datasets. The average accuracy of delta band to detect between healthy and seizure patients using Hanning band is 99.6% while for theta, alpha and beta is 97.33%, 96% and 96.33% respectively. It is inferred from other bands that the variations in all metrics of different clusters of healthy and seizure patients are more. As compared to previous works which use all frequency bands for detection, proposed work is computationally efficient as it uses an only single band. This works reports improvement in classification accuracy from our previous work reported in [8]. The feature extraction part has been implemented in MATLAB and classification part in Python 3.7. The work has been implemented on an Intel(R) Core(TM) i7-4790CPU@3.6 GHz; RAM 8 GB; 64-bit operating system.

Table 2 Performance metrics (in %) of other bands

4 Conclusion

In this paper, the delta band has been investigated for the detection of epileptic seizures. STFT has utilized on two publicly available datasets. Five different window functions have been used to check the robustness of the delta band. After STFT, delta band has been extracted from t–f plane. Four statistical features are employed to classify among different data clusters. Among the experiments performed, it has been observed delta band is least dependent on window function comparison to the other bands. The results obtained indicate that the proposed seizure detection method provides good accuracy, sensitivity and specificity with less complexity. The proposed method will be helpful for neurologists in analyzing the EEG signal for seizures and making their diagnosis more accurate. Apart from the detection of seizure, the neuroscience research community will also get benefitted in understanding the physiological process of delta band related to epilepsy.