# The Influence of Motion Data Low-Pass Filtering Methods in Machine-Learning Models
## 4 Discussion
This sudden change in foot speed results in a broad range of signal frequencies; aggressive low-pass filters might eliminate the essential high-frequency details thus impacting the accuracy of step-length calculation. On the other hand, motion data in the M-L and vertical direction mainly consisted of lower frequency signals (i.e., \(<\)4 Hz) and higher frequency noise. Therefore, the selection of cutoff and order might have less effect on the gait characteristics calculated in the M-L and vertical directions. However, perturbed walking might also introduce higher frequency components into the signals moving in the vertical direction (i.e., toe clearance), which might explain why filter parameters affected gait characteristics in perturbed walking differently than regular walking. The reliability between the standard filter used for motion analysis (fourth-order Butterworth with cutoff of 6 Hz) and other filters indicated that filters with a high order (four or six) and low cutoff frequency (4 Hz) would lead to a lower reliability in the calculated gait characteristics. This is potentially because only a small range of frequencies could pass these filters which have a strict cutoff frequency. On the other hand, a group of filters showed excellent reliability with the standard filter (ICC \(>\) 0.98 in Figure 2) for all of the gait characteristics included in this study, especially the second-order filter with cutoff of 4 Hz and the sixth-order filter with cutoff of 8 Hz, which result in almost equivalent results with the standard one. Such findings suggest that more options of low-pass filters for gait analysis could be accurately applied for gait feature calculation with limited effects on the results. The limited sample size (\(n=33\)) represents a limitation in the analysis. Although our 5-fold cross-validation results indicated that this sample size yields reliable results, this sample size reduces the statistical power of the study and might limit the generalizability of the findings. To address this limitation, future studies could consider strategies to increase the dataset, such as recruiting more participants or employing generative artificial intelligence algorithms to generate synthetic data [29]. These approaches could enhance the robustness and reliability of our findings. Based on our findings, the performance of classification models was significantly influenced by both the filter order and cutoff frequency. The AUC could be improved by 0.05-0.08 by employing a more refined low-pass filter compared to an improper filter (the difference between the best and worst in Table 3). This highlights the importance of filter order and cutoff frequency for machine-learning model development, where a more refined filter could lead to higher classification/prediction accuracy. Interestingly, the optimal filter settings varied by classifier. The LR and SVC models performed the best with the standard filter and the other two similar filters, which had lower cutoff frequencies (4-8 Hz). This suggests that stricter filters, which remove more noise and smooth the signal, might improve the performance of these models. In contract, RFC benefited from a higher cutoff frequency (10-12 Hz) and a higher filter order. The RFC model is less sensitive to noise; therefore, including more high-frequency components in the gait data could enhance its performance. Overall, these findings underscore the necessity of tailoring filter design to the specific classifier in use, especially when optimizing for high-dimensional data in classification tasks. For models with low-to-medium complexity, a standard filter (a sixth-order filter with 8 Hz cutoff, or fourth-order filter with 6 Hz cutoff) tends to yield the best performance. However, models with high complexity could employ higher-order filters with higher cutoffs (sixth order with 10-12 Hz cutoff) to improve performance.