## 4 Discussion
This temporal characteristic of the LSTM architecture and its long-term dependences make it a solid candidate to extract temporal features from our motion data explaining its improved performance relative to LDA for modeling non-steady-state locomotion especially in complex datasets such as subject-independent paradigms. Falls are common in people with PD patients and restrict participation in daily activities. Terrain characteristics is one of the major factors that contribute to falls in PD patients According to [37; 38], at the time of the fall, patients were either walking on a ramp, stairs, a slope or that they had transitioned from one surface to another. Accurate understanding and analysis of circumstances of falls could provide insights for improved functionality of assistive technologies and activity monitoring systems in such circumstance. In subject-independent paradigms, the number of signal sources providing relatively accurate (F1 score \(\geq\) 0.8) recognition appeared to be higher using LSTM compared to LDA (Table 1). For example, using LDA for detection of RA, RD and LWp resulted in F1 scores \(<\) 0.8 for all signal sources. Similar results were observed for SA, SD, and LWf where only a few signal sources provided relatively accurate outcomes. However, when LSTM was applied, at least two/three signal sources reached F1 scores of 0.8-0.95. This could suggest higher flexibility in selecting input signal's location using LSTM compared to LDA. The results also support the second hypothesis, highlighting the fact that using a more complex classification algorithm could provide simpler alternatives to collecting data from multiple body locations. From a practical standpoint, this could improve computational complexity,patient convenience, and instrumentation cost by eliminating the need for sensorizing multiple body segments [39; 40]. For instance, feet signals demonstrated comparable performance to signal fusion in all locomotor tasks when LSTM was applied (\(p>0.05\)), suggesting feet inertial data as the optimal input information that could properly function across a range of activities with minimal instrumentation. Statistically significant differences were observed between subject-dependent training relative to subject-independent paradigms in most cases when LDA was applied. The lower accuracy of subject-independent paradigms may be indicative of biomechanical differences between healthy subjects and PD patients [41] as well as across PD patients [42; 43]. This could result in high intra-class variations posing a difficult problem for a linear classifier [28]. However, LSTM appeared to generalize better to such differences. Using LSTM led to achieving more comparable outcomes for subject-independent and subject-dependent paradigms (\(p>0.05\)). For instance, comparing feet/signal fusion outcomes using LSTM across training paradigms did not reveal any statistically significant differences between subject-independent and subject-dependent training. This implies that LSTM could allow building subject-independent activity recognition systems. Unlike subject dependent, subject independent paradigms, are flexible enough to be applied on different users without the need of retraining the model for each person. This would be of higher benefit in individuals with PD where training the system for each user could be inconvenient due to large number of tasks and increased risk of falls, stumbles and injuries during some activities (e.g., non-steady-state transitions). Neural networks (e.g., LSTM) can receive raw data with minimum pre-processing, alleviating the need for manual feature engineering, thus could minimize engineering bias. Frequency or time-domain features [22; 44] used in conventional machine learning algorithms (e.g., LDA) are problem-specific, and do not generalize well to other problems. For instance, the optimum feature set could vary depending on the target activity.