*Limitations*

Our study is somewhat limited by the fact that IMU data are not considered the "gold standard" for defining ground-truth gait parameters. Force plates would have allowed the precise detection of HC and TO events, and possibly of the individual muscle contribution to ground reaction forces, to be performed [59,60]. However, it would have been impracticable to record the high number of steps and total gait time acquired in our study using force plates. IMU systems are sufficiently accurate in the assessment of fundamental gait spatiotemporal parameters [23,61] and have previously been used as ground truth for gait event detection [62]. Furthermore, they allow the SWP event to be detected, which cannot be captured by ground devices, foot switches, or insole pressure sensors.

The proposed approach was not tested on healthy control data. However, we expect our model to effectively predict gait events in healthy controls, as patient data are more heterogeneous and generally more challenging in terms of gait alterations, and inter-subject and inter-trial variability, as well as artifact contamination.

We were also only able to recruit a few patients for this study. However, it should be considered that walking for over three minutes in the meds-off state is very challenging for subjects with PD and greatly limited patient recruitment. Another limitation was the relatively homogeneous walking speed across all patients. We preferred not to alter the patients' natural speed, because we wanted to test our model in an ecological setup. In addition, the meds-off state limited the recording window and the possibility of exploring more than one gait condition. It is thus presently unclear how well our prediction model would perform for different speeds when applied out of the box. However, it is straightforward to adapt the model to different speeds by either temporally adjusting the embedding delays (*τ*1, . . . , *τ<sup>K</sup>* ) of test participants to their individual walking speed or retraining the model on data with matching speed.

#### **5. Conclusions**

We have demonstrated the accurate and robust detection of gait events in six parkinsonian patients using just two EMG probes placed on the left and right vastus lateralis. Unlike solutions presented in previous work, our approach proceeds in two steps: First, IMU time courses are predicted using EMG activity within a surrounding temporal window using multiple linear regressions. Second, gait parameters such as heel strike and toe-off events are extracted from the predicted time series. This approach led to accurate results and has the advantage over previous ones that discrete gait events and continuous time series of relevant kinematic quantities can be predicted. It is further expected that it could be generalized to the extraction of further gait parameters not considered here without any model retraining. Our model and an example dataset, as well as Matlab code for data preprocessing, model training, model evaluation, and plotting, have been made publicly available under https://github.com/braindatalab/EMGgaitprediction (accessed on 4 February 2023). Our approach may have practical benefits for gait studies in which the application of multiple sensing devices is considered impractical, troublesome, or too expensive. Notably, our model was validated using a leave-one-patient-out strategy. We observed very good performance in held-out patients, demonstrating that the model is able to accommodate the across-patient variability of the studied clinical population. Future work could adapt our approach to varying walking speeds and may further extend it to the prediction of other kinematic data obtained using EMG.

**Author Contributions:** Conceptualization, S.H. and I.U.I.; methodology, S.H., C.P. and I.U.I.; software, S.H.; formal analysis, S.H. and F.P.; investigation, C.P. and I.U.I.; resources, S.H., C.P. and I.U.I.; data curation, C.P.; writing—original draft preparation, S.H. and I.U.I.; writing—review and editing, S.H., C.P., F.P. and I.U.I.; visualization, S.H. and C.P.; supervision, C.P.; project administration, I.U.I.; funding acquisition, S.H., C.P. and I.U.I. All authors have read and agreed to the published version of the manuscript.

**Funding:** This study was sponsored by Deutsche Forschungsgemeinschaft (DFG; German Research Foundation) Project-ID 424778381-TRR 295 and Fondazione Grigioni per il Morbo di Parkinson. S.H. received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement No. 758985). C.P. was supported by a grant from German Excellence Initiative to the Graduate School of Life Sciences, University of Würzburg. I.U.I. received funding from New York University School of Medicine and The Marlene and Paolo Fresco Institute for Parkinson's and Movement Disorders, which was made possible with support from Marlene and Paolo Fresco.

**Institutional Review Board Statement:** The study was conducted in accordance with the Declaration of Helsinki and approved by the Ethics Committee of University of Würzburg (Nos. 103/20 and 36/17).

**Informed Consent Statement:** Informed consent was obtained from all subjects involved in the study.

**Data Availability Statement:** The data presented in this study are available upon request from the corresponding author. The data are not publicly available for privacy reasons.

**Acknowledgments:** We would like to thank all patients and caregivers for their participation. The draft manuscript was edited for English language by Deborah Nock (Medical WriteAway, Norwich, UK).

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
