1. Introduction
Stroke remains a leading cause of disability and mortality worldwide, with a rising incidence and recurrence rates [
1]. It primarily affects the central nervous system, often resulting in long-term motor dysfunction, particularly in the lower limbs, which frequently manifests as gait abnormalities [
2,
3]. These gait impairments not only impede patients’ daily activities but are also strongly correlated with increased risks of falls, recurrent strokes, and other complications [
4,
5,
6]. Consequently, these challenges impose significant physical and psychological burdens on patients and present substantial economic strains on families and society. Gait analysis is a critical component of rehabilitation assessment in stroke patients, providing precise kinematic data to inform personalized rehabilitation strategies [
7,
8]. Accurate gait assessment facilitates not only the monitoring of recovery progress but also the prediction of future fall risks and potential secondary injuries, thereby guiding clinical interventions more effectively [
9]. Research indicates that the precision of gait analysis is directly linked to rehabilitation outcomes, underscoring its indispensable role in stroke rehabilitation [
10].
Traditional gait assessment methods often rely on clinical visual observations or basic physical measurements, such as gait speed and stride length [
11]. While these methods are straightforward and practical, they are prone to subjective biases and fail to capture the complexity of gait patterns [
12]. Despite the adoption of modern gait analysis tools, such as three-dimensional motion capture systems and portable gait analysis devices, these systems are often costly, complex to operate, and require specific equipment and environments, limiting their broader clinical application [
13,
14]. Isokinetic dynamometry, a widely used tool in sports medicine and rehabilitation, accurately measures muscle strength and function, providing vital data on muscle performance during dynamic tests [
15]. However, despite the extensive data generated by isokinetic assessments, their potential for gait prediction remains underutilized.
With advances in computational capabilities and the development of big data technologies, machine learning has achieved significant progress in the medical field in recent years. These algorithms are extensively applied in medical imaging analysis, disease prediction, and personalized treatment planning due to their strengths in managing large-scale and complex datasets [
16,
17,
18]. In stroke rehabilitation, machine learning can extract valuable features from multimodal data, enhancing diagnostic and therapeutic accuracy [
16]. Integrating isokinetic muscle strength data with machine learning algorithms for gait prediction can effectively address the limitations of traditional methods. Preliminary studies have demonstrated the significant potential of machine learning models in processing biomechanical data, enabling the extraction of key features that influence gait [
19]. This approach not only improves prediction accuracy but also facilitates early detection of gait deviations, allowing for more targeted rehabilitation interventions for stroke patients. Previous studies have made significant progress in gait analysis and prediction using machine learning techniques, particularly deep learning approaches that have shown promise in classifying and predicting gait in stroke patients [
20,
21,
22]. However, much of this research has focused on analyzing imaging data or simple gait parameters, with relatively few studies incorporating muscle strength data into gait prediction. Meanwhile, existing models often struggle with generalization when dealing with complex gait features, and the lack of diversity in data samples limits their applicability [
23]. In addition, the accuracy of current gait prediction models in identifying gait deviations needs improvement, particularly when dealing with complex movement patterns [
24].
This study primarily aims to analyze isokinetic muscle strength data using machine learning algorithms to predict the Gait Deviation Index (GDI) in stroke patients. This work seeks to fill gaps in existing research and provide a novel tool for gait assessment, further optimizing rehabilitation strategies for stroke patients. By developing more accurate gait prediction models, this study aims to make progress in improving the precision and clinical feasibility of gait analysis, thereby enhancing stroke rehabilitation programs and providing valuable references for future research in related fields.
3. Results
In this study, data on knee joint isokinetic muscle strength and GDI were collected and analyzed from a total of 150 post-stroke hemiplegic patients.
Table 2 provides a summary of the key parameters measured for the flexor and extensor muscles on both sides at different speeds (60°/s, 90°/s, 120°/s), including the median values and IQR.
Using the RFE method, 20 of the most important features were extracted from the original data on knee joint muscle strength and GDI. For ease of subsequent analysis and presentation, these features were renamed as Feature 1 through Feature 20. The mapping between the original feature names and the new names is detailed in
Table 3. The distribution of the extracted features is displayed through histograms, as shown in
Figure 2 and
Figure 3. The data for Features 1 through 20 are evenly distributed and tend to follow a near-normal distribution. This indicates that the dataset’s attributes and labels are stable, with no significant bias or imbalance.
Table 2.
Isokinetic muscle strength test data situation.
Table 2.
Isokinetic muscle strength test data situation.
Speed (deg/s) |
Muscle Group |
Measurement Side |
PT (Nm) |
PT/BW (%) |
Max Work of Repeated Actions (J) |
CV (%) |
Average Power (W) |
Total Work (J) |
Acceleration Time (s) |
Deceleration Time (s) |
ROM (deg) |
Average Peak Torque (Nm) |
60 |
Extensor |
Healthy Side |
29.03 (43.15, 72.18) |
38.45 (64.12, 102.57) |
30.42 (51.38, 81.8) |
22.0 (10.9, 32.9) |
17.45 (21.85, 39.3) |
155.15 (190.62, 345.78) |
60.0 (60.0, 120.0) |
60.0 (120.0, 180.0) |
13.55 (99.03, 112.58) |
25.72 (33.12, 58.85) |
60 |
Extensor |
Affected Side |
21.27 (25.43, 46.7) |
32.75 (34.56, 67.31) |
27.6 (23.6, 51.2) |
42.3 (14.3, 56.6) |
11.92 (12.28, 24.2) |
106.0 (80.9, 186.9) |
100.0 (70.0, 170.0) |
60.0 (130.0, 190.0) |
25.08 (79.38, 104.45) |
14.6 (20.36, 34.95) |
60 |
Flexor |
Healthy Side |
17.48 (15.07, 32.55) |
24.94 (22.32, 47.26) |
26.9 (8.1, 35.0) |
45.9 (9.95, 55.85) |
9.88 (2.9, 12.78) |
99.8 (24.0, 123.8) |
100.0 (90.0, 190.0) |
170.0 (120.0, 290.0) |
17.3 (94.0, 111.3) |
16.5 (11.11, 27.6) |
60 |
Flexor |
Affected Side |
8.98 (8.81, 17.79) |
15.39 (12.79, 28.18) |
13.77 (0.4, 14.17) |
49.43 (22.47, 71.9) |
4.91 (0.1, 5.01) |
40.9 (1.6, 42.5) |
80.0 (110.0, 190.0) |
110.0 (140.0, 250.0) |
25.6 (83.1, 108.7) |
7.37 (5.77, 13.14) |
90 |
Extensor |
Healthy Side |
25.12 (37.92, 63.05) |
33.42 (58.2, 91.62) |
29.83 (46.3, 76.12) |
15.02 (7.48, 22.5) |
21.27 (30.68, 51.95) |
111.2 (206.4, 317.6) |
40.0 (80.0, 120.0) |
40.0 (120.0, 160.0) |
11.25 (101.9, 113.15) |
24.73 (31.95, 56.68) |
90 |
Extensor |
Affected Side |
12.84 (12.41, 25.24) |
17.16 (19.94, 37.1) |
23.45 (4.45, 27.9) |
26.65 (12.35, 39.0) |
12.35 (2.3, 14.65) |
94.5 (11.82, 106.33) |
107.5 (112.5, 220.0) |
90.0 (130.0, 220.0) |
12.12 (100.5, 112.62) |
9.54 (10.28, 19.81) |
90 |
Flexor |
Healthy Side |
5.97 (7.9, 13.88) |
8.05 (11.73, 19.78) |
9.18 (0.33, 9.5) |
35.98 (18.42, 54.4) |
6.06 (0.1, 6.16) |
28.77 (0.93, 29.7) |
50.0 (120.0, 170.0) |
70.0 (130.0, 200.0) |
28.1 (81.6, 109.7) |
5.33 (6.37, 11.7) |
90 |
Flexor |
Affected Side |
24.58 (31.9, 56.48) |
34.37 (49.52, 83.89) |
21.5 (47.4, 68.9) |
12.4 (7.1, 19.5) |
24.05 (35.12, 59.18) |
99.8 (196.8, 296.6) |
50.0 (90.0, 140.0) |
40.0 (130.0, 170.0) |
11.27 (102.2, 113.47) |
17.74 (31.21, 48.95) |
120 |
Extensor |
Healthy Side |
12.92 (25.27, 38.2) |
18.35 (37.92, 56.27) |
23.95 (23.95, 47.9) |
15.68 (6.83, 22.5) |
21.79 (19.46, 41.26) |
115.03 (92.38, 207.4) |
70.0 (130.0, 200.0) |
60.0 (150.0, 210.0) |
26.05 (83.85, 109.9) |
9.84 (22.72, 32.55) |
120 |
Extensor |
Affected Side |
10.4 (11.97, 22.38) |
14.12 (17.32, 31.45) |
19.8 (2.3, 22.1) |
24.18 (15.93, 40.1) |
14.25 (1.55, 15.8) |
80.55 (6.45, 87.0) |
67.5 (140.0, 207.5) |
77.5 (140.0, 217.5) |
11.2 (101.6, 112.8) |
9.14 (9.05, 18.19) |
120 |
Flexor |
Healthy Side |
4.59 (9.42, 14.01) |
7.04 (13.08, 20.12) |
6.83 (0.3, 7.12) |
32.3 (24.6, 56.9) |
4.7 (0.1, 4.8) |
26.83 (1.0, 27.83) |
67.5 (142.5, 210.0) |
80.0 (140.0, 220.0) |
24.5 (85.4, 109.9) |
5.2 (6.3, 11.5) |
120 |
Flexor |
Affected Side |
29.03 (43.15, 72.18) |
38.45 (64.12, 102.57) |
30.42 (51.38, 81.8) |
22.0 (10.9, 32.9) |
17.45 (21.85, 39.3) |
155.15 (190.62, 345.78) |
60.0 (60.0, 120.0) |
60.0 (120.0, 180.0) |
13.55 (99.03, 112.58) |
25.72 (33.12, 58.85) |
Observing the matrix, we can identify strong positive correlations between certain features. For instance, Features 8 and 9, as well as Features 16 and 17, have correlation coefficients close to 1 (0.97), indicating a very high positive correlation. Similarly, Feature 8 and Feature 14 also exhibit a strong correlation (0.95). These highly positive correlations suggest that these features share similar trends in the dataset and may collectively reflect similar biological or functional information. On the other hand, some features, such as Feature 4 and Feature 5, show a significant negative correlation (-0.37). This indicates that these features have opposite trends in the dataset, potentially representing different or mutually inhibitory physiological mechanisms. Such negative correlations could play a complementary role in model prediction, thereby influencing the overall performance of the model.
Figure 4.
Correlation matrix of selected features. Note: The colors in the matrix range from blue to red, indicating the direction and strength of the correlations between features. Blue represents negative correlations, while red represents positive correlations, with the intensity of the color reflecting the strength of the correlation.
Figure 4.
Correlation matrix of selected features. Note: The colors in the matrix range from blue to red, indicating the direction and strength of the correlations between features. Blue represents negative correlations, while red represents positive correlations, with the intensity of the color reflecting the strength of the correlation.
The performance results of the four predictive models are summarized in
Table 4. Overall, each model demonstrated varying degrees of effectiveness in predicting the GDI for post-stroke hemiplegic patients, with the Random Forest Regression model showing the best overall performance. Specifically, the Random Forest model had a MSE of 16.18 ± 1.92 and an R
2 of 0.89 ± 0.06, indicating higher predictive accuracy and reliability. Additionally, it had the lowest MAE of 2.99 ± 0.69. In comparison, the Lasso Regression model, while effective, performed slightly lower with an MSE of 22.29 ± 3.28 and an R
2 of 0.85 ± 0.18. The SVR model and the BP Neural Network model showed moderate to lower performance, with the SVR model yielding an MSE of 31.58 ± 5.48 and an R
2 of 0.82 ± 0.13, and the BP Neural Network model having the poorest performance, with an MSE of 50.38 ± 9.12 and an R
2 of 0.79 ± 0.21. These results suggest that although all models possess predictive capabilities, the Random Forest Regression model provides the most accurate and consistent results.
Figure 5 illustrates a scatter plot comparing the GDI values predicted by the RF model with the actual GDI values. The scatter plot shows that most of the predicted values are close to the dashed line, indicating high predictive accuracy and stability of the model.
Figure 6A to
Figure 6D present summary plots of SHAP values for the four different models, which help to interpret the decision-making process by showing each feature’s contribution to the model’s predictions.
Figure 6A displays the SHAP values for the Random Forest model, It is evident that Feature 2, Feature 14, and Feature 12 have a substantial positive influence on the model’s predictions.
Figure 6B illustrates the distribution of feature importance in the SVR model. In this model, Feature 2, Feature 14, and Feature 9 have a strong impact on the model’s output, while features like Feature 18 and Feature 3 contribute less, and in some cases, may even have a negative effect. This indicates that the importance of features in the SVR model is more dispersed.
Figure 6C shows the SHAP value distribution for the BP Neural Network model. Here, Feature 2, Feature 14, and Feature 20 significantly influence the model’s output, highlighting their importance in the neural network. Interestingly, compared to other models, Feature 3 and Feature 1 have more prominent SHAP values, suggesting that the BP Neural Network model relies more heavily on certain key features.
Figure 6D presents the SHAP value analysis for the Lasso Regression model. In this model, Feature 2, Feature 14, and Feature 4 have high SHAP values, indicating their crucial role in the model’s predictions. Additionally, Feature 8 and Feature 7 also show considerable influence, suggesting that the Lasso Regression model effectively balances the contributions of multiple features.
Notably, across all four models, Feature 2 and Feature 14 consistently exhibit significant influence, underscoring their importance in predicting GDI. This consistency across models highlights the critical role these features play in the prediction process.
Figure 6.
SHAP Summary Plot of different models. Note: In these plots, the color gradient from blue (low value) to red (high value) represents the size of the feature values, and the X-axis represents the SHAP values, with larger values indicating a more significant impact of the feature on the model’s output.
Figure 6.
SHAP Summary Plot of different models. Note: In these plots, the color gradient from blue (low value) to red (high value) represents the size of the feature values, and the X-axis represents the SHAP values, with larger values indicating a more significant impact of the feature on the model’s output.
4. Discussion
This study aimed to predict the GDI in post-stroke hemiplegic patients by integrating knee joint isokinetic strength assessment data with machine learning models. The results indicate that the RF model performed exceptionally well in handling complex biomechanical data, particularly in predicting gait deviations. Its accuracy and stability significantly outperformed traditional models such as SVR and BP Neural Networks. The RF model, by integrating multiple decision trees, effectively reduced the risk of overfitting, demonstrating greater robustness [
28]. This finding aligns with existing literature, which confirms the widespread application and superior performance of RF in handling high-dimensional data and complex features. For instance, RF models have shown advantages in predicting survival rates in chronic obstructive pulmonary disease (COPD) patients and assessing cardiovascular disease risks, showcasing their strength in processing multidimensional clinical data [
31]. Moreover, the model’s effectiveness in managing nonlinear relationships and noisy data further supports its applicability and reliability in gait analysis [
32].
In contrast, while deep learning models excel in processing imaging data, they tend to overfit with smaller sample sizes, leading to insufficient generalization capabilities [
33]. The results of this study suggest that in clinical environments with limited resources or smaller datasets, the Random Forest model may be more suitable. This provides clinicians with an efficient and reliable tool for gait prediction, holding significant practical value. Although deep learning models have demonstrated superior predictive accuracy, their “black-box” nature limits their clinical application [
34]. This study identified that Feature 2 (maximum work of the affected side’s knee extensors at 60°/s) and Feature 14 (maximum work of the affected side’s knee extensors at 120°/s) were particularly important for predicting GDI. These features reflect the strength performance of knee extensors at different angular velocities, highlighting the critical role of extensor strength in gait stability and coordination. The existing literature widely supports this finding. Research shows that knee extensors play a crucial role during the stance phase of the gait cycle, particularly when patients need to maintain body stability and bear weight [
35]. Insufficient extensor strength is often associated with stance phase issues, potentially leading to hyperextension or flexion deformities of the knee, thereby affecting gait stability and symmetry [
36]. Additionally, the differences in extensor work across different angular velocities reflect muscle performance under dynamic loading conditions, which is especially important for gait control in post-stroke hemiplegic patients [
37,
38]. Further research suggests that enhancing knee extensor strength can effectively improve gait performance, reduce the risk of joint injuries, and enhance walking ability and independence [
39]. Meanwhile, insufficient extensor strength may increase the risk of gait instability, leading to a higher likelihood of falls and recurrent strokes [
40]. This study further validates the importance of knee extensor strength in gait control, particularly in the rehabilitation process of post-stroke hemiplegic patients. Strengthening these key muscle groups can significantly improve gait, reduce fall risk, and accelerate recovery, providing a solid scientific basis for developing personalized rehabilitation plans [
35,
41].
The use of SHAP technology significantly enhanced the interpretability of complex models by providing consistent and globally interpretable feature contribution values, which is also of great significance in clinical applications. For example, SHAP technology has been successfully applied in cardiovascular risk prediction models, increasing doctors’ confidence in model results [
42]. Similarly, SHAP’s application in diabetes management has not only improved model interpretability but also helped in designing more precise personalized treatment plans [
43]. By introducing SHAP technology, this study further improved the clinical applicability of machine learning models, making prediction results easier for doctors to understand and apply, thereby optimizing the development of personalized rehabilitation plans [
44].
In handling small sample sizes, traditional machine learning models demonstrated significant advantages [
45]. BP Neural Networks are prone to overfitting with small samples, resulting in inadequate generalization capabilities. For example, the literature points out that deep learning models often exhibit instability when processing small sample data, requiring regularization or data augmentation techniques for improvement [
46]. In contrast, ensemble learning models such as Random Forest are more suitable for handling complex biomechanical data with small sample sizes, as they better manage data noise and avoid overfitting [
47]. Moreover, studies have shown that traditional machine learning models often provide more robust predictive results when handling high-dimensional data, especially when the sample size is limited, further supporting the findings of this study [
48].
Despite the significant achievements in predicting gait deviations, this study has some limitations. First, the sample size was relatively small, including only 150 post-stroke hemiplegic patients. Although this sample size provided initial validation for model development, its generalizability might be limited when dealing with more complex and diverse patient populations. Future research should expand the sample size and include a more diverse patient population, encompassing different genders, ages, disease courses, and rehabilitation stages. By increasing sample diversity, researchers can develop more generalizable gait prediction models, improving model generalization ability and providing more personalized rehabilitation recommendations for different types of patients. Second, this study primarily relied on knee joint isokinetic strength assessment data. While these data are important for gait prediction, gait deviations result from the interaction of multiple factors, including muscle strength, balance ability, neural control, and external environmental factors. Solely relying on knee joint strength data may not fully capture all the relevant factors of gait deviation. Future research should explore the integration of multimodal data, combining balance ability tests, surface electromyography, gait imaging data, neuroimaging data, and biomarker data, to construct a more comprehensive gait prediction model. Integrating multimodal data will help capture the causes of gait deviations more comprehensively, improving the accuracy of the model’s predictions and providing more precise rehabilitation guidance. Finally, although this study used SHAP technology to enhance model interpretability, machine learning models may still exhibit a “black-box” effect in practical applications. This issue is particularly important in clinical decision-making, as doctors need to understand the specific basis for model predictions to better apply them in patient rehabilitation plans. Future research should continue to explore how to improve the interpretability of machine learning models, developing more intuitive visualization tools and explanatory methods, making it easier for clinicians to understand and apply these models’ predictions. This is crucial for better integrating machine learning models into the clinical decision-making process.