# Detection of Movement and Lead-Popping Artifacts in Polysomnography EEG Data
## 7 Conclusions
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Local Window** & **Local 1** & \multicolumn{6}{c}{**Global 2**} & \multicolumn{6}{c}{**Number of Declared Outlier Segments by Channel**} \\ \cline{3-10}  & **Threshold** & **Threshold** & **F3** & **F4** & **C3** & **C4** & **O1** & **O2** & **Total** \\ \hline
60 & 2/3 & 1/4 & 357 & 122 & 1249 & 204 & 178 & 184 & 184 \\
60 & 1/2 & 1/4 & 103 & 15 & 718 & 78 & 41 & 36 & 36 \\
60 & 1/4 & 1/4 & 40 & 0 & 448 & 16 & 4 & 6 & 6 \\
90 & 2/3 & 1/4 & 372 & 123 & 1258 & 207 & 179 & 189 & 189 \\
90 & 1/2 & 1/4 & 110 & 16 & 729 & 77 & 41 & 38 & 38 \\
90 & 1/4 & 1/4 & 41 & 0 & 451 & 16 & 4 & 6 & 6 \\
180 & 2/3 & 1/4 & 372 & 129 & 1257 & 217 & 183 & 188 & 188 \\
180 & 1/2 & 1/4 & 108 & 16 & 733 & 78 & 41 & 38 & 38 \\
180 & 1/4 & 1/4 & 41 & 0 & 448 & 16 & 4 & 6 & 6 \\ \hline \hline \end{tabular}   
* \({}^{\dagger}\) Local thresh is set at the stated fraction of the median of the average correlation for all segments in the window for the channel. 2 Global thresh is set at the stated fraction of the 75 th percentile of all average correlations in the “good” segment pool for that channel. \begin{tabular}{c c c c c c c c c c} \hline \hline
**Local Window** & **Local 1** & \multicolumn{6}{c}{**Global 2**} & \multicolumn{6}{c}{**Number of Declared Outlier Segments by Channel**} \\ \cline{3-10}  & **Threshold** & **Threshold** & **F3** & **F4** & **C3** & **C4** & **O1** & **O2** & **Total** \\ \hline
60 & 2/3 & 1/4 & 357 & 122 & 1249 & 204 & 178 & 184 & 184 \\
60 & 1/2 & 1/4 & 103 & 15 & 718 & 78 & 41 & 36 & 36 \\
60 & 1/4 & 1/4 & 40 & 0 & 448 & 16 & 4 & 6 & 6 \\
90 & 2/3 & 1/4 & 372 & 123 & 1258 & 20 Figure A3: Artifact regions as annotated by the algorithm for each of the six channels. Black vertical bars mark artifact regions. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Local Window** & **Local 1** & **Global 2** & **Distance** & \multicolumn{3}{c}{**Confusion Matrix**} & \multirow{2}{*}{**Kappa**} & \multirow{2}{*}{**Accuracy (\%)**} \\
**(min)** & **Thresh** & **Thresh** & & **b-a** & & & & & \\
**(min)** & **TIP** & **FP** & **FN** & **TN** & & & & \\ \hline \hline \multirow{9}{*}{60} & 2/3 & 1/2 & 5 & 11,259 & 4198 & 1700 & 29,265 & 0.702 & 87.3 \\  & 2/3 & 1/2 & 6 & 11,470 & 5590 & 1489 & 27,873 & 0.655 & 84.8 \\  & 1/2 & 1/2 & 4 & 11,429 & 5590 & 1530 & 27,873 & 0.652 & 84.7 \\  & 1/2 & 1/2 & 5 & 11,112 & 3751 & 1847 & 29,712 & 0.713 & 87.9 \\  & 1/2 & 1/2 & 6 & 11,268 & 4509 & 1691 & 28,954 & 0.689 & 86.6 \\  & 1/4 & 1/2 & 5 & 11,112 & 3751 & 1847 & 29,712 & 0.713 & 87.9 \\  & 1/4 & 1/2 & 6 & 11,268 & 4509 & 1691 & 28,954 & 0.689 & 86.6 \\  & 2/3 & 1/4 & 4 & 11,470 & 5590 & 1489 & 27,873 & 0.655 & 84.8 \\  & 2/3 & 1/4 & 5 & 11,216 & 4198 & 1743 & 29,265 & 0.699 & 87.2 \\  & 2/3 & 1/4 & 6 & 11,429 & 5590 & 1530 & 27,873 & 0.652 & 84.7 \\  & 1/2 & 1/4 & 4 & 11,268 & 4509 & 1691 & 28,954 & 0.689 & 86.6 \\  & 1/2 & 1/4 & 5 & 10,343 & 3019 & 2616 & 30,444 & 0.701 & 87.9 \\  & 1/2 & 1/4 & 6 & 10,343 & 3019 & 2616 & 30,444 & 0.701 & 87.9 \\  & 1/4 & 1/4 & 4 & 11,268 & 4509 & 1691 & 28,954 & 0.689 & 86.6 \\  & 2/3 & 1/10 & 4 & 11,429 & 5590 & 1530 & 27,873 & 0.652 & 84.7 \\  & 2/3 & 1/10 & 5 & 11,216 & 4198 & 1743 & 29,265 & 0.699 & 87.2 \\  & 2/3 & 1/10 & 6 & 11,429 & 5590 & 1530 & 27,873 & 0.652 & 84.7 \\  & 1/2 & 1/10 & 5 & 10,343 & 3019 & 2616 & 30,444 & 0.701 & 87.9 \\  & 1/2 & 1/10 & 6 & 10,452 & 3838 & 2507 & 29,625 & 0.671 & 86.3 \\ \hline \hline \end{tabular}
\end{table} 
Table A3: Comparative performance in identification of artifactual regions between annotation by an expert and the use of the proposed algorithm with different local window sizes, different thresholds, and different distance cutoffs for the joining of outlier segments into an artifactual region. Performance comparisons between the expert-annotated artifacts and the algorithm-identified artifacts. Confusion matrix entries indicate the number of segments out of 46,422.