# Predicting the Onset of Freezing of Gait Using EEG Dynamics
## 3 Results and Discussion  
### Classification Performance  
For two-class classification, all models achieved acceptable performances with high sensitivity and specificity, as shown in Table 2. Leave-one-subject-out (LOSO) classification results for the transition to FOG vs. transition to voluntary stopping are shown in Table 3. The undesirable coh-kappa values might be due to the unbalanced classes. Further, all models achieve acceptable performance for three-class classification with high sensitivity and specificity, as shown in Table 4. LOSO classification results for the three-class problem are shown in Table 5.  
Our models were trained with a relatively small dataset with an unbalanced number of trials in the three classes, which might have adversely affected the performance of these data-hungry models. Deep ConvNet performed better than EEGNet or Shallow ConvNet because of its greater depth, while EEGNet and Shallow ConvNet might have been more susceptible to noise from the raw EEG data, as they are compact and shallower, degrading the features and resulting in poorer performance. In earlier works, the period of four seconds prior to freezing was considered as the transition to freezing [15]; however, we considered a shorter window for the transition to freezing [17]. This shorter transition period might have more clinical practicality as brain  
Figure 2: EEG preprocessing and feature extraction for DL models. dynamics dynamically change within a short period. Therefore, by employing a sliding window of two seconds, our results demonstrate that we might be able to identify the transition to freezing from normal walking or the transition to voluntary or intentional stopping. Further, we considered the raw EEG data with minimal data processing to allow for real-time prediction of the onset of FOG. However, employing sophisticated advancements in EEG analysis methods might further improve classification accuracies. We employed CNN models to detect the transition to FOG or the onset of FOG from the potential confounding intention to stop and normal walking conditions. The distinct brain dynamics during the transitions to FOG and voluntary stopping episodes were exploited in a system design. These classification models are valuable in developing compensatory systems that preserve and advance alternate neural pathways to assist gait in PD patients. Therefore, with an accurate and reliable prediction of freezing, cueing strategies to redirect attention or prompt movement can help alleviate gait impairment in PD patients [24]. Further, the advances in wearable technology have made it possible to deliver a comfortable cueing system for PD patients [25,26]. However, despite the development of several FOG prediction models [14, 15, 16], accurately and reliably detecting the onset of freezing remains an open challenge. It is also crucial to avoid the confounding transitions to voluntarily stopping or normal walking to ensure a robust prediction of freezing onset. Our findings demonstrated the potential of EEG data in distinguishing FOG onset from normal gait or initiation of voluntary stopping. Our results will pave the way toward therapeutic prediction and mitigation of freezing in PD patients. Further, these results aid and promote investigations of intentional stopping during gait, as a reliable prediction of intention could be valuable for motor rehabilitation. \begin{table}
\begin{tabular}{c c c c c} \hline
**Model** & **Accuracy** & **F1-Score** & **Coh-Kappa** & **Sensitivity** & **Specificity** \\ \hline EEGNet & \(71.92\pm 5.64\%\) & \(69.49\pm 5.38\%\) & \(52.57\pm 4.63\%\) & \(87.8\pm 5.90\%\) & \(84.02\pm 4.06\%\) \\ Shallow & \(73.68\pm 3.87\%\) & \(73.53\pm 3.76\%\) & \(57.14\pm 4.53\%\) & \(89.28\pm 4.59\%\) & \(86.2\pm 3.37\%\) \\ ConvNet & & & & \\ \end{tabular}
\end{table} 
Table 4: Five-fold classification performance for transition to FOG vs. transition to voluntary stopping vs. normal walking.