Meta-heuristic and machine learning based functional capacity prediction using gait parameters in patients with heart failure Authors: Aylin Tanriverdi Eyolcu, Ayşe Doğru, Selim Buyrukoğlu, Sema Savci, Buse Ozcan Kahraman, Mehmet Birhan Yilmaz Published: 2026 ABSTRACT This study aimed to predict functional capacity using wearable sensor-based spatiotemporal and kinematic gait parameters, and meta-heuristic-based machine learning approaches in patients with heart failure (HF). This cross-sectional study included 70 patients with HF and assessed functional capacity and gait parameters using the six-minute walk test and a wearable inertial sensor, respectively. The Synthetic Minority Over-Sampling Technique for Regression was employed to increase the number of instances. The optimisation of four machine learning models (XGBoost, LightGBM, Random Forest, CatBoost) was implemented using Simulated Annealing, Genetic Algorithms, Particle Swarm Optimisation (PSO) and Bayesian Optimisation. The model performance was evaluated via 10-fold cross-validation through the R-squared coefficient (R²), root mean square error (RMSE), mean absolute error (MAE), and mean squared error (MSE). The interpretability of the optimal model was investigated using SHapley Additive exPlanations (SHAP) to explain individual feature contributions. The hybrid PSO-CatBoost model provided better predictive accuracy (R2 = 0.9456; RMSE = 17.2891; MAE = 10.9230; MSE = 298.9114) as compared to other hybrid optimisation-model configurations. SHAP ranked right stride length and gait speed as the most important features. The hybrid PSO-CatBoost demonstrated high predictive accuracy in estimating functional capacity in patients with HF using gait parameters, but its potential as a clinical decision-support tool requires further validation.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-026-56217-x. Introduction A universal definition of heart failure (HF) is that ‘HF is a clinical syndrome with symptoms and/or signs caused by a structural and/or functional cardiac abnormality and corroborated by elevated natriuretic peptide levels and/or objective evidence of pulmonary or systemic congestion’1. The prevalence of HF is 56 million people on a global scale, and rises with age in both women and men, with high mortality and morbidity rates2,3. This condition is progressive if properly unmanaged, as the inability of the heart to pump efficiently causes inadequate blood flow to organs and tissues, stimulating compensatory mechanisms that can worsen the condition over time4. Orthopnoea, paroxysmal nocturnal dyspnea, fatigue, ankle swelling, reduced exercise tolerance, and inability to exercise are symptoms frequently encountered in clinical trials and used in risk scoring in patients with HF1. Patients with HF experience poor functional capacity caused by the coupling of reduced cardiac and pulmonary reserve, skeletal muscle and peripheral dysfunction, impaired autonomic regulation and existing comorbidities5. The 6-minute walk test (6MWT) is a widely applied tool to evaluate the functional capacity of HF patients6. 6MWT has been determined to be a safe, simple and reliable tool in this population7–9. 6MWT predicts mortality and morbidity in patients with HF10. Additionally, functional impairment assessed using 6MWT provides additional prognostic information over recognised risk markers in patients with HF11. Furthermore, the 6MWT distance (6MWD) provides prognostic information similar to that of peak oxygen consumption and the ventilatory efficiency obtained through cardiopulmonary exercise testing, a gold standard for measuring exercise capacity, in this population12. Gait speed has an incremental value in predicting mortality and hospitalisation in older patients with HF13. Gait parameters obtained from wearable sensors provide a large amount of data on human movement, such as gait speed, stride length, and cadence, regardless of whether those assessments are performed in laboratory or clinical settings14,15. Nowadays, machine learning (ML) approaches using parameters of gait analysis are widely investigated16–18. ML is one subfield of artificial intelligence that focuses on developing algorithms that allow computers to automatically learn patterns and make predictions or decisions based on data19. The applications of ML in patients with HF are becoming widespread. ML algorithms can be utilised for predicting HF risk, diagnosing HF, classifying HF phenotypes, and predicting outcomes following HF diagnosis20. Meta-heuristic algorithms are essential in enhancing the performance of ML models, as they effectively search a complex and multidimensional search space and avoid local minima. Their adaptive optimisation potential allows for optimising model hyperparameters with fine accuracy, which results in improved predictive accuracy, robustness and extrapolation to a wide variety of datasets21. By determining the feasibility of ML applications that estimate functional capacity using wearable sensor-based gait parameters, these models would have the potential to provide practical and accurate assessment and to optimise exercise prescription in cardiac rehabilitation, leading to better disease management in patients with HF. Therefore, this study aimed to predict functional capacity using wearable sensor-based spatiotemporal and kinematic gait parameters and meta-heuristic-based ML approaches in patients with HF and to determine the optimal gait parameters. Methods Study design and participants This was a single-centre, retrospective and cross-sectional study. Ethical approval of this this study was provided by Çankırı Karatekin University Ethics Commission (decision code: f4e68ddf5d3f451f, decision date: 09.07.2025). All participants in this study provided written informed consent. The study was conducted in accordance with the Declaration of Helsinki. Patients with heart failure and reduced ejection fraction (HFrEF), defined according to international guideline, comprised the study population22. Inclusion criteria consisted of being clinically stable, being between 35 and 85 years, and being in New York Heart Association (NYHA) functional class II or III. Exclusion criteria consisted of neurological or orthopaedical disease affecting mobility, significant chronic respiratory or kidney disease or diabetic neuropathy. Functional capacity assessment The 6MWT was performed to evaluate functional capacity following the international statement23. Participants were instructed to walk as quickly as possible along a 20-meter flat corridor for 6 min. The standard phrases of encouragement were used every minute during the test. The distance covered during 6MWT was noted as 6MWD. Gait assessment Gait assessment was performed using the reliable G-WALK® gait analysis system (BTS Bioengineering S.p.A., Italy)24. A wearable inertial sensor (G-SENSOR®) comprising a triaxial accelerometer (16 bit/axes; 8 g), a triaxial magnetometer (13 bit; 1200 µT), a triaxial gyroscope (16 bit/axes; 250°/s), and a global positioning system receiver was positioned at the S1 and S2 vertebrae and fastened with a semi-elastic strap25. Each participant was asked to walk along an 8-meter path at their preferred walking speed. Obtained data, sampled at 100 Hz, were wirelessly sent to a computer via Bluetooth, then processed using software (BTS G-STUDIO, version 3.5.25.0)25. In total, 37 gait parameters, automatically analysed by the software, were used for model development (see Supplementary, Table S1 online). Model development Figure 1 illustrates the framework for generating a meta-heuristic-based ML model construction and validation. Fig. 1The framework for generating the meta-heuristic-based ML model construction and validation. Abbreviation: ML: machine learning; RFE, recursive feature elimination; XGBoost, extreme gradient boosting; LightGBM, light gradient boosting machine; RMSE, root-mean-square error; MAE, mean absolute error; MSE, mean squared error. The framework for generating the meta-heuristic-based ML model construction and validation. Abbreviation: ML: machine learning; RFE, recursive feature elimination; XGBoost, extreme gradient boosting; LightGBM, light gradient boosting machine; RMSE, root-mean-square error; MAE, mean absolute error; MSE, mean squared error. Data augmentation and preprocessing The dataset used in this research was expanded via the Synthetic Minority Over-sampling Technique for Regression (SMOGN), which boosted the number of total observations to 41026–28. In contrast to standard oversampling, SMOGN uses a relevance function to determine which areas of the continuous target variable are underrepresented and increases the number of observations of the training sample to 41026. The strategy aims at increasing the capacity of the model to acquire the uncommon pathological gait patterns without affecting the general data distribution. The final sampling size chosen at 410 observations was calculated assessing that they will give the meta-heuristic optimization process enough statistical power and reduce the risk of overfitting that commonly comes with defining too much synthetic data creation. The modeling pipeline was designed in such a way that it all possibilities of data leakage and ensure methodological rigor. First, 80% training set and a 20% independent testing set were created out of the original data (n = 70). More importantly, all preprocessing operations such as data augmentation (SMOGN) and Recursive Feature Elimination (RFE) were carried out in the training folds. The test set, made up of 14 original patients, was completely untouched by any data generation or feature selection processes used to create a synthetic data set. This will guarantee that the model test is based on real clinical generalizability on unseen data (see Fig. 1 to see the detailed pipeline). In order to make the performance estimates of the small dataset (10-fold cross-validation) stable and reliable, a 10-fold cross-validation framework was applied on the development set (80% of the original data). This strategy, together with an independent hold-out test set (20%), is a strong evaluation of how the model can be applied to unobserved clinical cases. Recursive feature elimination Recursive Feature Elimination (RFE) is a feature selection method which removes and keeps the most relevant features in a recursive manner, training a model and removing the least significant features29. The model is fitted to the data at every iteration, and features are ranked by their importance or contribution to the predictive performance. The most insignificant feature(s) are eliminated, and the process continues until the number of features required is achieved. RFE was used to reduce the noise and increase the interpretability of the models. It was necessary to optimize the feature space, which was achieved by selecting the 25 important gait parameters out of the initial 37. Besides, the SMOGN algorithm was incorporated into the pipeline to take care of data imbalance. SMOGN was effective in enhancing the learning ability of the model because of complex biomechanical interactions by having a relevance function that concentrated on underrepresented target values. Meta-heuristic algorithms for hyperparameter optimisation The optimisation of hyperparameters is an essential stage in ensuring the overall performance of an ML model is optimised. In the present research, the traditional ML methods were supplemented by meta-heuristic and Bayesian algorithms, which provide more advanced and efficient optimisation strategies21. These algorithms are characterised by the possibility to explore a wide parameter space, locate global optima and minimise the probability of local optima entrapment. Simulated Annealing (ASA) automatically changes the cooling schedule and the sampling strategy in the parameter space based on the nature of the problem30. The adaptive mechanism allows the algorithm to find the global optimum faster and more efficiently and decreases the chances of local optima trapping. It is especially useful in high-dimensional, nonlinear optimisation problems. Genetic algorithm (GA) is powerful, nature-inspired optimization tool that use evolutionary principles to solve complex problems across diverse domains. Their adaptability and ability to search large, complex spaces make them valuable for both theoretical and practical applications31. In a GA, mutation and crossover operations are used on the entire new generation. Hybrid Particle Swarm Optimisation (HPSO) is a hybrid algorithm that is built upon the Particle Swarm Optimisation (PSO)32. HPSO aims to address the issue of premature convergence and enhance the process of global solution discovery by keeping the quick convergence property of PSO and exploiting the advantage of other algorithms. HPSO usually uses the global search power of PSO with the local search or exploration powers of other complementary algorithms. This combination allows the algorithm to both perform a wide-ranging search and perform more detailed searches in promising areas. Bayesian Optimisation is based on the development of a probabilistic model of the objective function, typically a Gaussian Process33. The model has already been assessed to create a pre-belief regarding the behaviour of the function. A function of acquisition is then used to decide the next most promising point to consider. The acquisition function is a trade-off between exploration (searching areas where the model is uncertain) and exploitation (searching in areas that are likely to give good results). This is done iteratively until a predetermined number of iterations has been completed or until a convergence criterion has been reached. Machine learning algorithms In the present work, a collection of ML algorithms that are typically used in regression problems and which exemplify various learning paradigms was used. These algorithms are famous in terms of performance and effectiveness in different spheres of application34. Extreme Gradient Boosting (XGBoost) is a faster and more efficient type of the gradient boosting model with a specific optimised implementation35. XGBoost works by repeatedly building the weak learners, usually decision trees, by gradient of the loss function, with each new tree designed to reduce the errors made by the previous learners. Regularisation techniques are also used in this method to control overfitting, thus turning XGBoost into an effective and robust modelling tool. Light Gradient Boosting Machine (LightGBM), unlike the classic gradient boosting algorithms, builds trees in a leaf-wise manner instead of level-wise36. The approach enables more complex trees to be built and thus becomes more accurate but can also run the risk of overfitting. LightGBM also offers rapid training times, histogram-based algorithms and parallel learning features. Random forest (RF) works through the pooling of several decision trees, each of which has been trained on a randomly chosen subset of the dataset37. Moreover, the random subset of features is taken into account at every split. This added randomness also minimises overfitting and increases the generalizability of the model. RF is an excellent option when it comes to classification and regression tasks because it can be highly effective and interpreted. CatBoost uses ordered boosting to avoid target leakage, symmetric (oblivious) trees to create balanced trees, and boosting to build computationally efficient trees38. Other sampling techniques, such as minimal variance sampling, stabilise the gradient estimation and enhance convergence and generalisation. These properties allow CatBoost to enjoy good predictive accuracy, high efficiency in training on a large sample, and high performance on heterogeneous and categorical attributes. Hyperparameter tuning The process of hyperparameter optimisation is an essential part of the process of ML optimisation39. In this work, a wide hyperparameter range was specified in relation to each of the ML models. The hyperparameters set aside in the individual models are provided in Supplementary, Table S2 online. The best hyperparameter settings were found within such ranges using meta-heuristic algorithms like SA, GA, PSO and Bayesian Optimisation. In order to fully replicate the results, the particular optimization parameters, such as the iterations, the population sizes, and convergence criterion of each algorithm, are clearly written in Supplementary Table S3. The last optimized settings are given in the same table as well. Computational experiments were performed all on Google Colab platform with a Tesla T4 to provide a standard of processing power and disclosure of computational cost. Explainability via SHapley Additive exPlanations Lundberg and Lee proposed a game theory-based interpretability tool called SHapley Additive exPlanations (SHAP), which is designed to explain the black-box behaviour of ML models34. This technique measures the amount that each feature adds to the prediction of the model in a just way, according to the concept of Shapley values; that is, it measures the effect of a feature on the model prediction relative to the baseline. Evaluation metrics All the models were analysed based on the following metrics, as compared to their performance40.1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}\:=\:1-\:\frac{{\sum\:}_{i=1}^{n}{({y}_{i}\:-{\widehat{y}}_{i})}^{2}}{{\sum\:}_{i=1}^{n}{({y}_{i}\:-\:\underline{y})}^{2}}$$\end{document}2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\mathrm{R}\mathrm{M}\mathrm{S}\mathrm{E}\:=\:\sqrt{\frac{1}{n}{\sum\:}_{i=1}^{n}{({y}_{i}\:-{\widehat{y}}_{i})}^{2}}$$\end{document}3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\mathrm{M}\mathrm{A}\mathrm{E}\:=\frac{1}{n}{\sum\:}_{i=1}^{n}\left|{y}_{i}-{\widehat{y}}_{i}\right|$$\end{document}4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\mathrm{M}\mathrm{S}\mathrm{E}\:=\:\frac{1}{n}{\sum\:}_{i=1}^{n}{({y}_{i}-{\widehat{y}}_{i})}^{2}$$\end{document} In these equations, n is the total observations, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{y}_{i}$$\end{document} is the actual value of an observation, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{y}}_{i}\:$$\end{document}is the prediction given by the model of the same observation and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\underline{y}$$\end{document} is the average of all the actual values. Statistical analysis Continuous variables are presented as mean ± standard deviation values, whereas those with alternative distributions are presented as median and interquartile range values. Categorical variables are presented as the number (percentage) of patients with the corresponding attribute. Moreover, comparisons between the training and testing datasets were performed using the Student t-test (Welch t-test) with continuous variables that are normally distributed, the Mann-Whitney U test with non-normally distributed continuous variables, and the Fisher exact test with categorical variables. p-value < 0.05 was considered statistically significant. Python (version 3.12) was used for ML and statistical analyses. Results Baseline characteristics of 56 patients from the training dataset and 14 patients from the testing dataset are presented in Table 1. The age, gender, ejection fraction, NYHA functional class, medications, implantable cardioverter defibrillator, and 6MWD were similar between the training and testing datasets (p > 0.05). The body mass index was significantly higher in the training dataset compared to the testing datasets (p = 0.03). Table 1Demographic and clinical characteristics of participants.HFrEF (n = 70)Mean ± SDTraining data (n = 56)Mean ± SDTesting data (n = 14)Mean ± SDP valueAge, y62.33 ± 8.8162.36 ± 8.4862.21 ± 10.390.963Gender, n (%) Men58 (82.9)46 (82.1)12 (85.7)1.000 Women12 (17.1)10 (17.9)2 (14.3)BMI, kg/m²28.30 ± 4.0428.69 ± 4.2926.76 ± 2.380.030*EF, %31.20 ± 6.6831.14 ± 6.7531.43 ± 6.630.887NYHA class (II/III)47 (67.1) / 23 (32.9)38 (67.9) / 18 (32.1)9 (64.3) / 5 (35.7)1.000Medications, n (%) Beta-blockers55 (78.6)45 (80.4)10 (71.4)0.480 ACE inhibitors/ARBs56 (80.0)43 (76.8)13 (92.9)0.272 Digoxin12 (17.1)9 (16.1)3 (21.4)0.695 Diuretics51 (72.9)43 (76.8)8 (57.1)0.181 MRAs12 (17.1)8 (14.3)4 (28.6)0.240 Anticoagulants/antiplatelet57 (81.4)47 (83.9)10 (71.4)0.277 Statins41 (58.6)35 (62.5)6 (42.9)0.230 Antidiabetic23 (32.9)21 (37.5)2 (14.3)0.122 ICD, n (%)16 (22.9)13 (23.2)3 (21.4)1.000 6-minute walk distance, m434.1 (393.0-469.8)430.6 (395.9–467.0)440.0 (354.5-493.3)0.633HFrEF, heart failure with reduced ejection fraction; BMI, body mass index; NYHA, New York Heart Association; EF, Ejection Fraction; ACE, angiotensin-converting enzyme; ARB, angiotensin receptor blocker; MRAs, mineralocorticoid receptor antagonists; ICD, implantable cardioverter defibrillator; 6MWD, 6-minute walk distance. Data were expressed as mean ±standard deviation (SD) or median (interquartile range) or number (percentage), as appropriate.*Statistically significant difference (p < 0.05). Table 1Demographic and clinical characteristics of participants.HFrEF (n = 70)Mean ± SDTraining data (n = 56)Mean ± SDTesting data (n = 14)Mean ± SDP valueAge, y62.33 ± 8.8162.36 ± 8.4862.21 ± 10.390.963Gender, n (%) Men58 (82.9)46 (82.1)12 (85.7)1.000 Women12 (17.1)10 (17.9)2 (14.3)BMI, kg/m²28.30 ± 4.0428.69 ± 4.2926.76 ± 2.380.030*EF, %31.20 ± 6.6831.14 ± 6.7531.43 ± 6.630.887NYHA class (II/III)47 (67.1) / 23 (32.9)38 (67.9) / 18 (32.1)9 (64.3) / 5 (35.7)1.000Medications, n (%) Beta-blockers55 (78.6)45 (80.4)10 (71.4)0.480 ACE inhibitors/ARBs56 (80.0)43 (76.8)13 (92.9)0.272 Digoxin12 (17.1)9 (16.1)3 (21.4)0.695 Diuretics51 (72.9)43 (76.8)8 (57.1)0.181 MRAs12 (17.1)8 (14.3)4 (28.6)0.240 Anticoagulants/antiplatelet57 (81.4)47 (83.9)10 (71.4)0.277 Statins41 (58.6)35 (62.5)6 (42.9)0.230 Antidiabetic23 (32.9)21 (37.5)2 (14.3)0.122 ICD, n (%)16 (22.9)13 (23.2)3 (21.4)1.000 6-minute walk distance, m434.1 (393.0-469.8)430.6 (395.9–467.0)440.0 (354.5-493.3)0.633HFrEF, heart failure with reduced ejection fraction; BMI, body mass index; NYHA, New York Heart Association; EF, Ejection Fraction; ACE, angiotensin-converting enzyme; ARB, angiotensin receptor blocker; MRAs, mineralocorticoid receptor antagonists; ICD, implantable cardioverter defibrillator; 6MWD, 6-minute walk distance. Data were expressed as mean ±standard deviation (SD) or median (interquartile range) or number (percentage), as appropriate.*Statistically significant difference (p < 0.05). Demographic and clinical characteristics of participants. HFrEF, heart failure with reduced ejection fraction; BMI, body mass index; NYHA, New York Heart Association; EF, Ejection Fraction; ACE, angiotensin-converting enzyme; ARB, angiotensin receptor blocker; MRAs, mineralocorticoid receptor antagonists; ICD, implantable cardioverter defibrillator; 6MWD, 6-minute walk distance. Data were expressed as mean ±standard deviation (SD) or median (interquartile range) or number (percentage), as appropriate. *Statistically significant difference (p < 0.05). Base model results with non-augmented and augmented data In RFE, 25 important gait features were revealed. Table 2 shows the relative performance of the various combinations of metaheuristic algorithms and ML models with non-augmented and augmented data. Many metaheuristic algorithms have been developed and tested, but among them, SA, GA, PSO, Bayesian Optimisation, and Recursive Feature RFE with the use of ML algorithms XGBoost, LightGBM, RF, and CatBoost, we can see clear differences in predictive accuracy. When basing model performance is evaluated without data augmentation, the results indicate significant variation in base model performance depending on which metaheuristic algorithm or RFE is used together with the ML models. RF demonstrates the best predictive performance across all tested settings compared to XGBoost, CatBoost, and LightGBM. RFE with RF showed the most overall performance, with the lowest RMSE (71.1277), MAE (40.2006) and MSE (5059.1552). When basing model performance is evaluated with data augmentation, CatBoost is always the best-performing model in the different metaheuristic algorithms, mostly in PSO, where the model has the lowest RMSE (17.2891), MAE (10.9230), and MSE (298.9114). This finding highlights the better predictive ability of the hybrid PSO-CatBoost in the process of modeling thorny relationships in the augmented data. Table 2Model results.Metaheuristic algorithmMachine learning modelNon-augmentedAugmentedTime (s)RMSEMAEMSERMSEMAEMSESimulated annealing (SA)XGBoost74.620946.69265568.285117.543811.6416307.7848787.9813LightGBM94.954369.74099016.316221.902415.3117479.71639.0805Random Forest77.150842.99065952.245323.591916.5245556.57710.5618CatBoost78.747145.60636201.106617.766312.1905315.64261.9748Genetic algorithm (GA)XGBoost80.620549.88186499.664919.059112.7000363.250910113.2704LightGBM93.323767.50848709.3068 17.9302 12.5060 321.4912 0.7559 Random Forest76.581042.79545864.654526.700018.4741712.88810.9676CatBoost83.307346.34996940.1133 20.8723 12.9302 435.6539 1.5578 Particle swarm optimisation (PSO)XGBoost75.566845.95145710.336919.638214.0947385.65894628.0069LightGBM94.274968.20318887.753520.220713.1259408.878110.7441Random Forest76.598342.77815867.302824.324316.9196591.6696 1.3885 CatBoost84.139145.67487079.3918 17.2891 10.9230 298.9114 1.1301Bayesian optimisation (BO)XGBoost76.308547.42375822.9906 17.6676 12.0909 312.1450 414.0509 LightGBM94.850869.48638996.683223.640015.9310558.849733.0357Random Forest76.500242.71385852.276028.071620.0777788.013936.0906CatBoost81.534743.34326647.912218.569511.5643344.824933.1481Recursive feature elimination (RFE)XGBoost89.007658.51097922.347920.591014.8939423.98892.1328LightGBM90.457162.03088182.493421.462313.5006462.770710.0014Random Forest 71.1277 40.2006 5059.1552 23.550713.4603554.63667.1287CatBoost88.268546.47347791.3252 19.7799 16.2506 391.2441 111.0317 Abbreviation: XGBoost, extreme gradient boosting; LightGBM, light gradient boosting machine; RMSE, root-mean-square error; MAE, mean absolute error; MSE, mean squared error. Table 2Model results.Metaheuristic algorithmMachine learning modelNon-augmentedAugmentedTime (s)RMSEMAEMSERMSEMAEMSESimulated annealing (SA)XGBoost74.620946.69265568.285117.543811.6416307.7848787.9813LightGBM94.954369.74099016.316221.902415.3117479.71639.0805Random Forest77.150842.99065952.245323.591916.5245556.57710.5618CatBoost78.747145.60636201.106617.766312.1905315.64261.9748Genetic algorithm (GA)XGBoost80.620549.88186499.664919.059112.7000363.250910113.2704LightGBM93.323767.50848709.3068 17.9302 12.5060 321.4912 0.7559 Random Forest76.581042.79545864.654526.700018.4741712.88810.9676CatBoost83.307346.34996940.1133 20.8723 12.9302 435.6539 1.5578 Particle swarm optimisation (PSO)XGBoost75.566845.95145710.336919.638214.0947385.65894628.0069LightGBM94.274968.20318887.753520.220713.1259408.878110.7441Random Forest76.598342.77815867.302824.324316.9196591.6696 1.3885 CatBoost84.139145.67487079.3918 17.2891 10.9230 298.9114 1.1301Bayesian optimisation (BO)XGBoost76.308547.42375822.9906 17.6676 12.0909 312.1450 414.0509 LightGBM94.850869.48638996.683223.640015.9310558.849733.0357Random Forest76.500242.71385852.276028.071620.0777788.013936.0906CatBoost81.534743.34326647.912218.569511.5643344.824933.1481Recursive feature elimination (RFE)XGBoost89.007658.51097922.347920.591014.8939423.98892.1328LightGBM90.457162.03088182.493421.462313.5006462.770710.0014Random Forest 71.1277 40.2006 5059.1552 23.550713.4603554.63667.1287CatBoost88.268546.47347791.3252 19.7799 16.2506 391.2441 111.0317 Abbreviation: XGBoost, extreme gradient boosting; LightGBM, light gradient boosting machine; RMSE, root-mean-square error; MAE, mean absolute error; MSE, mean squared error. Model results. Abbreviation: XGBoost, extreme gradient boosting; LightGBM, light gradient boosting machine; RMSE, root-mean-square error; MAE, mean absolute error; MSE, mean squared error. Figure 2 displays the bias-variance decomposition for the top-performing models from each algorithm family on the non-augmented and augmented datasets. The results indicate that all models suffer from high Mean Squared Error (MSE), with values ranging from 6269 for SA-XGBoost to 7512 for PSO-CatBoost. A significant portion of this error is attributable to high bias, suggesting that the models were underfitting and unable to capture the underlying complexity of the original dataset. Recognizing the limitations of the original dataset, data augmentation was employed to enhance model training. There is a dramatic reduction in MSE for all models; for example, the MSE for the PSO-CatBoost model decreased from 7512 to 560.46. This improvement is largely due to a significant reduction in the bias component, indicating that the augmented data enabled the models to learn the target function more effectively and overcome the initial underfitting problem. Fig. 2(a) Bias-variance decomposition for best models of non-augmented data, and (b) bias-variance decomposition for best models of augmented data. Abbreviation: RFE, recursive feature elimination; XGBoost, extreme gradient boosting; LightGBM, light gradient boosting machine. (a) Bias-variance decomposition for best models of non-augmented data, and (b) bias-variance decomposition for best models of augmented data. Abbreviation: RFE, recursive feature elimination; XGBoost, extreme gradient boosting; LightGBM, light gradient boosting machine. Figure 3 summarizes a comprehensive comparison of the coefficient of determination (R2) across four ML models (XGBoost, LightGBM, RF, and CatBoost) and five optimization strategies based on the non-augmented and the augmented data sets. On the non-augmented dataset, the RF model demonstrated superior performance, particularly with its default hyperparameter settings, achieving the highest R2 score of 0.614. On the augmented dataset, in a notable shift from the initial results, the CatBoost model emerged as the clear top performer, achieving the highest R2 scores with all optimization algorithms. The combination of CatBoost with PSO yielded the peak performance with an R2 of 0.9456. XGBoost also performed exceptionally well, with scores consistently above 0.929, while the relative performance of RF declined. Fig. 3(a) Heatmap of R2 performance of ML models based on optimization algorithms for non-augmented data, and (b) Heatmap of R2 performance of ML models based on optimization algorithms for augmented data. Abbreviation: ML: machine learning; XGBoost, extreme gradient boosting; LightGBM, light gradient boosting machine; PSO, particle swarm optimization; RFE, recursive feature elimination. (a) Heatmap of R2 performance of ML models based on optimization algorithms for non-augmented data, and (b) Heatmap of R2 performance of ML models based on optimization algorithms for augmented data. Abbreviation: ML: machine learning; XGBoost, extreme gradient boosting; LightGBM, light gradient boosting machine; PSO, particle swarm optimization; RFE, recursive feature elimination. To understand feature influence on the model predictions, a global SHAP decision plot was generated for the models trained on the non-augmented data and augmented data, as shown in Figs. 4. Features such as left pelvic obliquity range and left pelvic tilt range appear to be among the most influential, as indicated by the wide range their decision paths cover across the model’s output values for non-augmented data. After data augmentation, features such as the right stride length and gait speed were recognised as the most dominant predictors. Fig. 4(a) Global SHAP decision plot of the most important features of the PSO-CatBoost model for Non-Augmented Data, and (b) Global SHAP decision plot of the most important features of the PSO-CatBoost model for Augmented Data. Abbreviation: PSO, particle swarm optimization. (a) Global SHAP decision plot of the most important features of the PSO-CatBoost model for Non-Augmented Data, and (b) Global SHAP decision plot of the most important features of the PSO-CatBoost model for Augmented Data. Abbreviation: PSO, particle swarm optimization. Discussion The main findings of the present study were (1) the RFE-RF model, when applied to inertial sensor-based gait parameters, had the best potential to predict functional capacity measured using 6MWT without data augmentation, (2) when data were augmented, the PSO-CatBoost model was superior compared to other ML models for the prediction of functional capacity in patients with HF, (3) left pelvic obliquity and pelvic tilt ranges were the most important features for predicting functional capacity without data augmentation, in contrast, right stride length and gait speed were the most important features for predicting functional capacity with data augmentation. This analysis provides initial insights into the key biomechanical parameters driving the predictions. Our findings demonstrate that data augmentation was a critical and transformative step in this modelling task. While the combination of the RFE-RF was the strongest performer on the limited original dataset, its advantage disappeared when the models were trained on the richer, augmented data. The overall high performance of CatBoost, regardless of the optimisation strategy used, is an indication of its strength and flexibility, which makes it a valid option in predictive modelling in augmented, complex datasets. Additionally, the augmentation process effectively mitigated the high bias (underfitting) observed initially, allowing the gradient boosting models, particularly CatBoost, to excel. Data augmentation led not only to more accurate models but also to more stable and reliable ones. Furthermore, the combination of the PSO-CatBoost for hyperparameter tuning yielded the best predictive performance, achieving an outstanding R2 score of 0.9456. This demonstrates a high degree of accuracy and reliability for the model’s predictions on unseen data. The present study also underscores the importance of a sufficiently large and diverse dataset for training robust ML models and highlights the effectiveness of CatBoost for this particular regression problem. A variety of related studies have been proposed in the literature, and they are presented in Table 3. De Cannière et al. found that a support vector machine (SVM) model using chronotropic response and effort as input features predicted 6MWD with an overestimation of 42.8 m in the cardiac rehabilitation population41. The present study demonstrated that hybrid PSO-CatBoost was the best model predicting 6MWD with an 10.9 m overestimation in patients with HF. This variation in distance is less than 32 m and 25 m, which is considered a clinically meaningful change in overall disease status in patients with HF and in assessing the effect of cardiac rehabilitation, respectively42,43. These findings indicate that hybrid PSO-CatBoost applied to gait parameters achieves a more accurate prediction for functional capacity in patients with HF. Table 3Summary of related studies.AuthorsDatasetData pre-processing /Employed modelsBest modelOutputLimitationsAdvantagesDe Cannière 202041A total of 129 cardiovascular patientst-distributed stochastic neighboring embedding (t-SNE)Linear, regression, SVMSVMSVM with RBF kernel: MAE (37.7)There is a lack of sufficient dataThe range of Machine Learning algorithms can be expanded to enhance the robustness of the applied model in the classification task.A support vector machine (SVM) model using chronotropic response and effort as input features predicted 6MWD with a mean absolute error of 42.8 m (± 36.8 m)Zhou et al. 202016239 Geriatric PatientsKernel Principal Component Analysis (KPCA)Support Vector Machine (SVM), Random Forest (RF), Artificial Neural Network (ANN)ANNAccuracy: 90%Meta-heuristic algorithms did not employ to improve the machine learning model.All three machine learning methods (SVM, RF, and ANN) were able to classify healthy young-middle-aged adults, healthy older adults, and geriatric patients based on dynamic gait outcomes with good accuracy.Noh et al. 202145746 older adultsN/AXGBoostXGBoostAccuracy ranged between 67–70%Sensitivity ranged between 43–53%Specificity ranged between 77–84%The range of Machine Learning algorithms can be expanded to enhance the robustness of the applied model in the classification task.The XGBoost algorithm was successful in identifying gait features that accurately classify fall risk levelsThe most important gait features for predicting fall risk were stride length, walking speed, and stance phase.Lim et al. 202417MMU Fall Risk Prediction (MMU-FRiP) dataset, consisting of 21 non-faller samplesMendeley public datasets, containing 44 elderly individualsAdditional dataset comprising 25 subjectsSMOTELogistic Regression (LR), KNN, RF, SVM, Voting, Extreme Gradient Boosting (XGBoost), AdaBoost, Bagging, MLP, CatBoost, Light Gradient Boosting (LightGBM), K-meansLightGBMAccuracy: 96%There is a lack of sufficient data, which may affect the model’s generalizability.The dataset used in the study is limited which may not be representative of the entire population.The LightGBM model demonstrated a superior accuracy of 96% in the prediction individuals at a higher risk of falling by analyzing their gait characteristicsMizuguchi et al. 202418417 elderly (≥ 75 years) with symptomatic chronic HF patientsFeatureSelection (Optuna®, an opensource hyper-parameter optimization framework)LightGBMLightGBMCohen’s weighted kappa: (0.812)No optimization algorithm was applied. Instead of using various machine learning algorithms, only one was employed.LightGBM for clinical frailty scale rating is feasible and can provide reliable, objective frailty assessments using gait analysis from smartphone video recordingsWenzel et al. 202446274 participants who performed CPET on a cycle ergometer.N/ADT, RF, k-nearest neighbors (kNN), Gradient Boosting (GB)RF for ˙peak oxygen GB for peak power outputRF (RMSE:6.52)GB (RMSE:43)To optimize the machine learning model, no feature selection or optimization algorithms were used.The most accurate machine learning model for predicting peak oxygen uptake (˙VO2peak) was the random forest (RMSE: 6.52 ml/kg/min [95% CI 5.21–8.17]), and for peak power output (PPO) it was the gradient boosting regression (RMSE: 43 watts [95% CI 35–52]) Table 3Summary of related studies.AuthorsDatasetData pre-processing /Employed modelsBest modelOutputLimitationsAdvantagesDe Cannière 202041A total of 129 cardiovascular patientst-distributed stochastic neighboring embedding (t-SNE)Linear, regression, SVMSVMSVM with RBF kernel: MAE (37.7)There is a lack of sufficient dataThe range of Machine Learning algorithms can be expanded to enhance the robustness of the applied model in the classification task.A support vector machine (SVM) model using chronotropic response and effort as input features predicted 6MWD with a mean absolute error of 42.8 m (± 36.8 m)Zhou et al. 202016239 Geriatric PatientsKernel Principal Component Analysis (KPCA)Support Vector Machine (SVM), Random Forest (RF), Artificial Neural Network (ANN)ANNAccuracy: 90%Meta-heuristic algorithms did not employ to improve the machine learning model.All three machine learning methods (SVM, RF, and ANN) were able to classify healthy young-middle-aged adults, healthy older adults, and geriatric patients based on dynamic gait outcomes with good accuracy.Noh et al. 202145746 older adultsN/AXGBoostXGBoostAccuracy ranged between 67–70%Sensitivity ranged between 43–53%Specificity ranged between 77–84%The range of Machine Learning algorithms can be expanded to enhance the robustness of the applied model in the classification task.The XGBoost algorithm was successful in identifying gait features that accurately classify fall risk levelsThe most important gait features for predicting fall risk were stride length, walking speed, and stance phase.Lim et al. 202417MMU Fall Risk Prediction (MMU-FRiP) dataset, consisting of 21 non-faller samplesMendeley public datasets, containing 44 elderly individualsAdditional dataset comprising 25 subjectsSMOTELogistic Regression (LR), KNN, RF, SVM, Voting, Extreme Gradient Boosting (XGBoost), AdaBoost, Bagging, MLP, CatBoost, Light Gradient Boosting (LightGBM), K-meansLightGBMAccuracy: 96%There is a lack of sufficient data, which may affect the model’s generalizability.The dataset used in the study is limited which may not be representative of the entire population.The LightGBM model demonstrated a superior accuracy of 96% in the prediction individuals at a higher risk of falling by analyzing their gait characteristicsMizuguchi et al. 202418417 elderly (≥ 75 years) with symptomatic chronic HF patientsFeatureSelection (Optuna®, an opensource hyper-parameter optimization framework)LightGBMLightGBMCohen’s weighted kappa: (0.812)No optimization algorithm was applied. Instead of using various machine learning algorithms, only one was employed.LightGBM for clinical frailty scale rating is feasible and can provide reliable, objective frailty assessments using gait analysis from smartphone video recordingsWenzel et al. 202446274 participants who performed CPET on a cycle ergometer.N/ADT, RF, k-nearest neighbors (kNN), Gradient Boosting (GB)RF for ˙peak oxygen GB for peak power outputRF (RMSE:6.52)GB (RMSE:43)To optimize the machine learning model, no feature selection or optimization algorithms were used.The most accurate machine learning model for predicting peak oxygen uptake (˙VO2peak) was the random forest (RMSE: 6.52 ml/kg/min [95% CI 5.21–8.17]), and for peak power output (PPO) it was the gradient boosting regression (RMSE: 43 watts [95% CI 35–52]) Summary of related studies. There is a lack of sufficient data The range of Machine Learning algorithms can be expanded to enhance the robustness of the applied model in the classification task. Kernel Principal Component Analysis (KPCA) Accuracy ranged between 67–70% Sensitivity ranged between 43–53% Specificity ranged between 77–84% The XGBoost algorithm was successful in identifying gait features that accurately classify fall risk levels The most important gait features for predicting fall risk were stride length, walking speed, and stance phase. MMU Fall Risk Prediction (MMU-FRiP) dataset, consisting of 21 non-faller samples Mendeley public datasets, containing 44 elderly individuals Additional dataset comprising 25 subjects There is a lack of sufficient data, which may affect the model’s generalizability. The dataset used in the study is limited which may not be representative of the entire population. Feature Selection (Optuna®, an opensource hyper-parameter optimization framework) RF (RMSE:6.52) GB (RMSE:43) In the literature, several studies identified different ML models using gait parameters for classification or prediction16–18. Zhou et al. investigated three different ML methods, including Kernel principal component Analysis (KPCA) in combination with Support Vector Machine (SVM), RF and Artificial Neural Network (ANN), to classify healthy young-middle-aged adults, healthy old adults, and geriatric patients based on gait outcomes16. Authors reported that KPCA in combination with SVM, RF, and ANN, when applied to dynamic gait outcomes, are capable of discriminating between age groups with the accuracy of 89%, 73.6% and 90%, respectively. Additionally, cross-entropy between medial-vertical and vertical acceleration, vertical direction, maximal Lyapunov exponent of the vertical acceleration, gait speed and the variability of the accelerations in anterior-posterior and vertical direction have been found to be the most important gait outcomes for classification16. Lim et al. reported that the LightGBM applied to sensor-based gait parameters is superior to predict falls with an accuracy of 96%17. Mizugucci et al. aimed to develop a ML–based automatic rating model of the Clinical Frailty Scale using gait analysis from smartphone video recordings for patients with HF18. The author demonstrated that the LightGBM automatic rating model achieved a good performance in estimating Clinical Frailty Scale, with Shapley analysis identifying 15 primary gait parameters, including gait speed, total gait time, stance phase time, and ankle swing speed, as key contributors to the Clinical Frailty Scale automatic rating system18. In the present study, global SHAP analysis revealed that left pelvic obliquity and pelvic tilt ranges were the most influential; however, when data were augmented, right stride length and gait speed emerged as the strongest features of functional capacity. This suggests that the augmented data allowed the model to uncover more robust and significant relationships between the spatiotemporal and kinematic gait parameters and functional capacity. Gait speed appears to be a key contributor across the studies, underpinning its prominence in prognosis in patients with HF13. ML model (PSO-CatBoost) and wearable sensor-based gait parameters may offer a promising approach for estimating functional status over time, optimising exercise prescription and assessing the effectiveness of cardiac rehabilitation to increase functional capacity in patients with HF. Gait speed and stride length emerged as the most influential variables in the best model, indicating their role in estimating functional capacity in patients with HF. Identifying declines in these gait parameters may reflect reduced functional capacity in patients with HF15. From a clinical perspective, monitoring changes in gait speed and stride length may support clinical decision-making, particularly when 6MWT is not feasible. While data limitations remain a challenge, our findings provide a methodological improvement by combining augmentation, feature elimination, and optimization in a unified pipeline. Our study was based on a single-center, cross-sectional design, which may limit the generalizability and clinical applicability of the findings, given the absence of external validation, longitudinal validation, and evaluation of clinical decision impact. Therefore, longitudinal and multicentre studies are required to confirm the generalizability of the model and to better define its role in clinical decision support. The present study advances the application of ML in clinical prediction tasks by systematically integrating feature selection, data augmentation, and optimisation techniques. Compared to earlier studies, our study applied recursive feature elimination and advanced meta-heuristic algorithms, alongside SMOGN-based data augmentation, to build robust predictive models using state-of-the-art learners. The method is in line with the recent literature, including the study by Trabassi et al. that stated that data balancing needs to be combined with generative AI to discover rare pathological patterns in small clinical gait datasets44. By leveraging PSO-CatBoost as the optimal model, our study achieved competitive predictive efficiency, outperforming several previous studies that lacked either feature selection or optimisation strategies16–18,41,45,46. This contribution demonstrates that the integration of meta-heuristic algorithms significantly enhances predictive accuracy and robustness compared to conventional approaches. Conclusion This study demonstrates that meta-heuristic-based ML models are useful for predicting functional capacity based on gait parameters in patients with HF. Augmentation through the use of SMOGN worked to enhance data representativeness and lower underfitting, whereas PSO was successful in hyperparameter fine-tuning and the resulting eventual capacity in prediction. CatBoost turned out to be significantly more accurate and more stable with PSO, which proves the power of such a combination to capture the intricate relationships between gait parameters. These results highlight the strength of CatBoost that is PSO-enhanced as an effective and feasible model of predictive analytics. Further studies should evaluate the findings on a much larger dataset in different HF trajectories. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 1