IED annotation
A total of 4,557 IEDs (2,112 frontal, 1,176 temporal, and 1,269 occipital) were annotated from the 38 patients with focal epilepsy. The number of IEDs per EEG recording was 141 ± 129, 90 ± 99, and 127 ± 68 in the frontal, temporal, and occipital regions, respectively. The mean lengths of frontal, temporal, and occipital IEDs were 0.45, 0.52, and 0.48 s, respectively. Detailed information on the patients with focal IEDs is presented in Table 1.
Binary classification
Table 1
Profiles of patients with frontal, temporal, and occipital IEDs
Frontal
|
|
|
|
|
|
|
Temporal
|
|
|
|
|
|
|
Occipital
|
|
|
|
|
|
|
Subject No.
|
Age
|
Sex
|
Duration of IEDs
|
Number of
IEDs
|
Subject No.
|
Age
|
Sex
|
Duration of IEDs
|
Number of
IEDs
|
Subject No.
|
Age
|
Sex
|
Duration of IEDs
|
Number of
IEDs
|
Max (s)
|
Min (s)
|
Avg (s)
|
Max (s)
|
Min (s)
|
Avg (s)
|
Max (s)
|
Min (s)
|
Avg (s)
|
1
|
9
|
M
|
0.70
|
0.25
|
0.43
|
134
|
1
|
17
|
F
|
0.83
|
0.30
|
0.52
|
189
|
1
|
14
|
F
|
0.69
|
0.19
|
0.33
|
86
|
2
|
8
|
M
|
0.58
|
0.33
|
0.48
|
6
|
2
|
11
|
M
|
0.65
|
0.30
|
0.42
|
65
|
2
|
13
|
F
|
0.70
|
0.24
|
0.44
|
90
|
3
|
12
|
M
|
0.86
|
0.20
|
0.45
|
549
|
3
|
7
|
M
|
0.72
|
0.26
|
0.43
|
15
|
3
|
9
|
F
|
1.03
|
0.26
|
0.45
|
281
|
4
|
16
|
M
|
0.77
|
0.28
|
0.48
|
113
|
4
|
18
|
M
|
0.56
|
0.25
|
0.34
|
20
|
4
|
16
|
F
|
0.75
|
0.25
|
0.42
|
167
|
5
|
12
|
M
|
0.48
|
0.44
|
0.45
|
4
|
5
|
63
|
M
|
0.76
|
0.22
|
0.44
|
345
|
5
|
17
|
F
|
0.86
|
0.28
|
0.52
|
159
|
6
|
7
|
F
|
0.80
|
0.22
|
0.49
|
147
|
6
|
39
|
M
|
0.68
|
0.22
|
0.44
|
108
|
6
|
12
|
M
|
0.81
|
0.31
|
0.50
|
158
|
7
|
10
|
M
|
0.61
|
0.17
|
0.35
|
69
|
7
|
31
|
M
|
0.83
|
0.29
|
0.49
|
210
|
7
|
11
|
M
|
1.05
|
0.31
|
0.61
|
127
|
8
|
11
|
M
|
0.67
|
0.22
|
0.41
|
107
|
8
|
63
|
F
|
0.86
|
0.36
|
0.65
|
39
|
8
|
10
|
M
|
0.91
|
0.38
|
0.51
|
57
|
9
|
13
|
M
|
0.76
|
0.33
|
0.53
|
149
|
9
|
51
|
F
|
0.59
|
0.28
|
0.46
|
40
|
9
|
16
|
M
|
0.76
|
0.33
|
0.53
|
89
|
10
|
12
|
F
|
0.45
|
0.22
|
0.30
|
39
|
10
|
63
|
F
|
0.46
|
0.30
|
0.39
|
11
|
10
|
14
|
M
|
0.76
|
0.39
|
0.51
|
55
|
11
|
12
|
M
|
0.77
|
0.24
|
0.48
|
227
|
11
|
45
|
F
|
2.60
|
0.31
|
1.01
|
52
|
|
|
|
|
|
|
|
12
|
18
|
F
|
0.69
|
0.24
|
0.46
|
103
|
12
|
25
|
F
|
1.27
|
0.31
|
0.58
|
50
|
|
|
|
|
|
|
|
13
|
17
|
M
|
0.75
|
0.27
|
0.43
|
117
|
13
|
26
|
F
|
0.86
|
0.36
|
0.61
|
32
|
|
|
|
|
|
|
|
14
|
7
|
M
|
0.92
|
0.27
|
0.49
|
167
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15
|
7
|
M
|
0.84
|
0.27
|
0.47
|
181
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sum
|
|
|
|
|
|
2112
|
|
|
|
|
|
|
1176
|
|
|
|
|
|
|
1269
|
Average
|
|
|
|
|
0.45
|
141
|
|
|
|
|
|
0.52
|
90
|
|
|
|
|
|
0.48
|
127
|
IED: interictal epileptiform discharge; M, male; F, female |
The numbers of epochs in the individual binary classification for the frontal, temporal, and occipital IEDs were 38,946, 27,952, and 24,222, respectively. The 1D CNN-based binary classification exhibited accuracies of 86.4% (sensitivity, 86.5%; specificity, 86.3%), 94.2% (95.3% and 93.1%), and 97.2% (98.5% and 95.8%) for frontal, temporal, and occipital IEDs, respectively. The 2D CNN-based binary classification exhibited respective accuracies of 79.3% (85.3% and 73.4%), 93.3% (96.4% and 90.2%), and 95.5% (96.6% and 94.4%). The accuracies for frontal IEDs were 7.8% and 10.7% lower than those for temporal and occipital IEDs, respectively, in the 1D CNN-based classification and 14.0% and 16.2%, respectively, in the 2D CNN-based classification. The frontal IED accuracy in the 2D CNN-based classification was 7.1% lower than in the 1D CNN-based classification (Table 2). The respective AUCs for the frontal, temporal, and occipital IEDs were 93.7%, 97.9%, and 99.8% for the 1D CNN-based classification and 87.2%, 98.0%, and 98.6% for the 2D CNN-based classification (Fig. 2).
The upper, middle, and lower panels in each column represent the AUCs of the frontal, temporal, and occipital IEDs, respectively.
CNN, convolutional neural network; IED, interictal epileptiform discharge; TPR, true positive rate; FPR, false positive rate
Table 2
Diagnostic performance of the binary classification models
|
1D CNN-based classification
|
2D CNN-based classification
|
|
Sensitivity (%)
|
Specificity (%)
|
Accuracy (%)
|
AUC (%)
|
Sensitivity (%)
|
Specificity (%)
|
Accuracy (%)
|
AUC (%)
|
Frontal
|
86.5
|
86.3
|
86.4
|
93.7
|
85.3
|
73.4
|
79.3
|
87.2
|
Temporal
|
95.3
|
93.1
|
94.2
|
97.9
|
96.4
|
90.2
|
93.3
|
98.0
|
Occipital
|
98.5
|
95.8
|
97.2
|
99.8
|
96.6
|
94.4
|
95.5
|
98.6
|
CNN, convolutional neural network; AUC, area under the receiver operating characteristic curve
Three-class classification
The three-class classification (excluding the frontal IEDs) included 32,709 epochs with a near 1:1:1 ratio between the temporal (11,439), occipital (10,575), and non-IED (10695) epochs. The 1D CNN-based three-class classification exhibited F1 scores of 89.9% (precision, 94.9%; recall, 85.4%), 90.6% (97.9% and 84.2%) and 86.0% (77.4% and 96.6%) for temporal, occipital, and non-IEDs, respectively, with an overall accuracy of 88.7%. The 2D CNN-based three-class classification showed respective F1 scores of 92.3% (92.7% and 91.9%), 84.9% (97.5% and 75.1%), and 84.3% (75.8% and 95.1%), with an overall accuracy of 87.0% (Table 3). The precision for non-IEDs was 17.5% and 20.5% lower than that for the temporal and occipital IEDs, respectively, in the 1D CNN-based classification, and 16.9% and 21.8%, respectively, in the 2D CNN-based classification. The number of temporal and occipital IEDs misclassified as non-IEDs (false negative focal IEDs) was 290 and 314, respectively, in the 1D CNN-based classification and 161 and 490, respectively, in the 2D CNN-based classification (Fig. 3a). The 2D CNN-based classification exhibited a 6.4% higher recall for temporal IED but a 9.1% lower recall for occipital IED than the 1D CNN-based classification.
Performance of the three-class (upper panels) and four-class (lower panels) classifications. CNN, convolutional neural network; IED, interictal epileptiform discharge
Table 3
Diagnostic performance of the multiclass classification models
|
1D CNN-based classification
|
2D CNN-based classification
|
|
Precision (%)
|
Recall (%)
|
F1 Score (%)
|
Precision (%)
|
Recall (%)
|
F1 Score (%)
|
Three class
|
|
|
|
|
|
|
Temporal
|
94.9
|
85.4
|
89.9
|
92.7
|
91.9
|
92.3
|
Occipital
|
97.9
|
84.2
|
90.6
|
97.5
|
75.1
|
84.9
|
Non-IED
|
77.4
|
96.6
|
86.0
|
75.8
|
95.1
|
84.3
|
Four class
|
|
|
|
|
|
|
Frontal
|
63.5
|
53.6
|
58.2
|
73.4
|
38.2
|
50.3
|
Temporal
|
89.2
|
84.4
|
86.7
|
83.8
|
89.7
|
86.6
|
Occipital
|
95.3
|
80.3
|
87.2
|
89.5
|
84.2
|
86.8
|
Non-IED
|
58.6
|
80.6
|
67.8
|
58.2
|
85.5
|
69.2
|
CNN: convolutional neural network; IED: interictal epileptiform discharge |
Four-class classification |
The four-class classification included 43,269 epochs with a near 1:1:1:1 ratio among the frontal (10,560), temporal (11,439), occipital (10,575), and non-IED (10,695) epochs. The 1D CNN-based four-class classification exhibited F1 scores of 58.2% (precision, 63.5%; recall, 53.6%), 86.7% (89.2% and 84.4%), 87.2% (95.3% and 80.3%), and 67.8% (58.6% and 80.6%) for frontal, temporal, occipital, and non-IEDs, respectively, with an overall accuracy of 74.9%. The 2D CNN-based four-class classification showed respective F1 scores of 50.3% (73.4% and 38.2%), 86.6% (83.8% and 89.7%), 86.8% (89.5% and 84.2%), and 69.2% (58.2% and 85.5%), with an overall accuracy of 74.6% (Table 3).
The precision for non-IEDs was 5.0%, 30.6%, and 36.8% lower than for the frontal, temporal, and occipital IEDs, respectively, in the 1D CNN-based classification, and 15.2%, 25.6%, and 31.3%, respectively, in the 2D CNN-based classification. The numbers of temporal, occipital, and non-IEDs misclassified as frontal IEDs (false positives for frontal IED) were 130, 240, and 281, respectively, in the 1D CNN-based classification and 53, 45, and 195, respectively, in the 2D CNN-based classification. The numbers of frontal, temporal, and occipital IEDs misclassified as non-IEDs (false negative focal IEDs) were 909, 172, and 139, respectively, in the 1D CNN-based classification, and 931, 132, and 250, respectively, in the 2D CNN-based classification (Fig. 3b).
The 2D visualization of the frontal, temporal, occipital, and non-IED features is shown in Fig. 4.
Feature visualization for the three-class (upper panels) and four-class (lower panels) classification. Green, blue, yellow, and red dots represent frontal, temporal, occipital, and non-IEDs, respectively. Owing to the large number of epochs (32,709 in the three-class classification and 43,269 in the four-class classification), we randomly selected 1,000 of each class for visualization (3,000 in the three-class classification and 4,000 in the four-class classification).
IED: interictal discharge and t-SNE: t-distributed stochastic neighbor embedding