## 4 Discussion  
Locomotion identification strategies have the potential to be complicated by Parkinson associated gait disturbances such as slowed movements, rigidity, tremor, and postural instability which could affect the generalizability of the outcomes obtained in healthy subjects to patient populations. Reduced self-regulating mechanisms could highly challenge patient transitions from one task to another throughout the course of disease [13; 14; 29; 30], and negatively impact the detection of non-steady-state locomotor tasks. Identifying reliable sources of information, appropriate training data, and classification algorithms could significantly improve system outcomes and patient convenience [31]. Therefore, the purpose of this study was to introduce a framework for continuous classification of non-steady-state activities of individuals with PD and investigate the benefits of different classification schemes for an accurate user intent recognition. Activity classification is essential for a complete ambulatory assessment of Parkinson related symptoms. For example, when it is combined with monitoring of tremor and bradykinesia, the symptoms during stair ambulation can be distinguished from that of walking [9]. It also enables the complete analysis of motor symptoms. For instance, to compute step length or to determine the ON and OFF states of PD patients during different activities, the activity should be classified first [32]. Moreover, according to previous research, posture transitions are associated with the risk of falls in PD patients [33]. Such framework can be used to detect and analyze the patterns of posture transition during transitions from one terrain to another to mitigate the risk of falls in this group of patients. Our first hypothesis regarding better performance of LSTM relative to LDA was supported. Within subject-independent paradigms, using a given signal source data with LSTM outperformed LDA in different locomotor tasks. This was especially notable in LWp where LDA resulted in poor task detection (F1 score = 0.19-0.6) while LSTM remarkably improved the outcomes (F1 score = 0.76-0.91). When the locomotion involves combinations of non-steady-state activities (e.g., circuit trials in this study), defining the exact boundaries of non-isolated tasks becomes very challenging. In such scenarios, a given task will have biomechanical characteristics of both the previous and the next activity [34] which could negatively impact the performance of task classification approaches. This is especially reflected when the duration of the task is short, so there is not enough time for biomechanical signals to be adjusted to the ongoing task rather than pervious or next mode. For instance, in this study, level ground turns before and after the single step on the elevated platform (Figure 1A) were marked as level walking during classifier training. These tasks have dominant biomechanical characteristics of the following and the preceding uneven terrains. Learning such complex patterns in the training data and distinguishing between level walking and other modes would be difficult problems for a linear classifier. High misclassification rates are indicative of the same fact (Table 2). According to our findings, models with non-linear decision boundaries (e.g., LSTM) could be more appropriate for modeling non-steady-state locomotion especially in complex datasets such as subject-independent paradigms. LSTM networks can capture long-term temporal dependencies [35], allowing taking full advantage of the motion information contained in the training data. Approaches that can exploit the temporal dependencies in time-series data present the optimal choice for modelling human movement captured with sensor data [36].