Engineering researchers have demonstrated an artificial intelligence prototype that pairs basic physiological markers with machine learning to recommend exercise categories, achieving high internal accuracy on historical records while proving vulnerable to sensor noise. Developed at Rwanda Polytechnic-Ngoma College and published in Frontiers in Big Data, the study examines whether body mass index, resting heart rate, age, and sex can generate initial workout suggestions without longitudinal activity histories or complex wearable streams. Testing an ensemble classifier across 60,000 tabular records yielded an internal accuracy of 99.61 percent and a receiver operating characteristic area under the curve of 0.992. However, the authors emphasize that these results reflect internal classification of pre-existing database labels rather than clinically validated exercise suitability.
The investigation addresses key limitations in existing personalized fitness platforms, which frequently depend on proprietary wearable ecosystems, continuous tracking histories, or complex sensor feeds that remain inaccessible in resource-constrained settings. Conventional fitness regimens often adopt broad templates that overlook individual physiological differences such as metabolic rate and cardiovascular condition, potentially causing exercise mismatches, overuse injuries, or burnout. To establish a practical, privacy-conscious alternative without tracking personal identifiers, the engineering team designed an Internet of Things biometric station centered on an ESP32 microcontroller. The physical setup integrated three off-the-shelf sensing modules: an optical MAX30102 photoplethysmography sensor interfacing via I2C to estimate resting heart rate, a strain gauge load cell with an HX711 amplifier to capture body weight, and an HC-SR04 ultrasonic module to determine height. Biometric readings were transmitted via Wi-Fi using HTTP POST requests in JSON format to a cloud backend built with the Flask web framework.
Model development utilized a structured dataset of 60,000 labeled records containing four input variables—age, sex, body mass index, and resting heart rate—paired with an observed target spanning 13 sport-combination labels, such as running with soccer, yoga with light walking, and high-intensity interval training with spinning. Data inspection confirmed complete records without missing entries. The researchers encoded sex into a binary numeric feature (one for males, zero for females) and scaled body mass index and resting heart rate to a zero-to-one interval using training-fitted Min-Max normalization. To prevent information leakage, all preprocessing parameters were derived exclusively from the training partition before application to validation and testing sets. The researchers implemented and compared five supervised learning algorithms: Decision Tree, Random Forest, Support Vector Machine, Logistic Regression, and XGBoost, alongside an imbalance-aware baseline combining XGBoost with Synthetic Minority Over-sampling Technique for Nominal and Continuous features.
To optimize candidate models without introducing overfitting bias, the investigators applied grid search tuning within a five-fold stratified cross-validation protocol on training data. For the primary gradient boosted tree model, the search identified optimal parameters at a learning rate of 0.1, maximum tree depth of 6, 100 boosting estimators, a subsample fraction of 0.8, and a column subsample ratio of 0.8. Across the five stratified validation folds, this optimized XGBoost pipeline achieved a mean accuracy of 96.14 percent with a standard deviation of plus or minus 0.24 percentage points, alongside balanced precision, recall, and macro F1-scores of 0.961. In comparative evaluations, XGBoost outpaced traditional baselines, with Random Forest reaching 94.3 percent test accuracy, Support Vector Machine attaining 89.2 percent, and Logistic Regression trailing at 86.8 percent. Statistical testing confirmed the significant superiority of XGBoost over Random Forest (paired t-test p = 0.018), Support Vector Machine (p = 0.006), and Logistic Regression (Wilcoxon signed-rank p = 0.003).
Beyond predictive metrics, the authors profiled computational resource utilization to evaluate deployment feasibility on cloud infrastructure. XGBoost exhibited an intermediate computational profile, requiring 8.7 seconds for training, a prediction latency of 15 milliseconds per inference pass, and a memory footprint of 2.3 megabytes. While Logistic Regression proved faster and smaller—recording 3.8 seconds for training, 8 milliseconds for inference, and 0.8 megabytes of memory—it lacked sufficient discriminative accuracy. Conversely, the oversampling-augmented XGBoost baseline required 60 seconds of training and 25 megabytes of memory with a 100-millisecond prediction speed, despite achieving slightly tighter cross-validation stability of plus or minus 0.1 percent. On the primary held-out test split of 12,000 samples, the standard XGBoost model achieved 99.61 percent accuracy and a DeLong-derived 95 percent confidence interval for the receiver operating characteristic area under the curve of 0.990 to 0.994. Class-wise analyses demonstrated strong F1-scores across diverse sports combinations, including 0.98 for basketball with volleyball.
Interpretable machine learning methods illuminated the predictive mechanisms driving the tree-based models. A correlation analysis established a moderate positive relationship between body mass index and resting heart rate (r = 0.44), an association that both Random Forest and XGBoost exploited during classification. Global feature contribution scores identified body mass index as the primary predictor in XGBoost with an importance value of 0.358, followed by resting heart rate at 0.329, chronological age at 0.198, and biological sex at 0.115. A controlled ablation experiment on 12,000 held-out records systematically assessed the necessity of each predictor for the 13-label classification task. When body mass index was omitted, accuracy dropped by 53.44 percentage points to 46.23 percent. Removing resting heart rate caused a 21.48 percentage point decline to 78.20 percent. Training the model exclusively on body mass index and resting heart rate reduced accuracy by 41.84 percentage points to 57.83 percent, demonstrating that the two biometrics alone cannot maintain performance without demographic features.
To inspect prediction behavior across individual sport combinations, the authors conducted TreeSHAP calculations on a stratified subset of 641 held-out records. These values quantify feature contributions to raw class margins rather than direct shifts in probability. For vigorous activities like running paired with soccer, resting heart rates of 68 beats per minute or below exerted a positive margin contribution averaging plus 1.55, whereas rates of 83 beats per minute or higher produced a negative contribution averaging minus 2.13. For gentler regimens like yoga with light walking, resting heart rate contributed minus 1.83 at lower rates and plus 0.88 at higher rates, while lower body mass index values below 20.48 kilograms per square meter added plus 2.14 compared to minus 2.25 for values exceeding 30.52. Furthermore, brisk walking with tai chi displayed non-linear patterns, showing a positive body mass index contribution between 27.33 and 30.52 but a sharp decline to minus 3.23 for lower values.
While the software model achieved remarkable precision on static database rows, an illustrative noise stress test demonstrated substantial vulnerability to input inaccuracies. Because physical sensor measurements naturally fluctuate, researchers simulated noise by applying independent Gaussian perturbations across 250 Monte Carlo draws on the frozen model using the 12,000-record test split. Under a moderate noise scenario—introducing a standard deviation of 0.5 kilograms per square meter for body mass index and 5 beats per minute for resting heart rate—accuracy fell from 99.63 percent to 83.61 percent, representing a 16.01 percentage point decline, while macro F1-score dropped from 0.9954 to 0.7916. Under these moderate fluctuations, 16.39 percent of predicted sport-combination outputs changed entirely. When researchers combined moderate noise with positive systematic biases of 0.5 kilograms per square meter and 5 beats per minute, accuracy collapsed by 23.94 percentage points to 75.68 percent, frequently transmuting high-intensity interval training into running or zumba.
Practical implementation trials through the web dashboard highlighted marked discrepancies between algorithmic training and physical sensor logging. The prototype Flask interface captured live readings, but administrative logs revealed critical data quality anomalies, including an impossible recorded heart rate of 432 beats per minute, an extreme body mass index calculation of 884.35, and an aggregate dashboard average body mass index of 1,357.19. In another logged instance, sequential readings for the same user ten seconds apart held body mass and heart rate constant but registered an 8.81 percent shift in measured height, causing a 15.54 percent drop in calculated body mass index that abruptly flipped the recommendation from spinning to walking. To address these vulnerabilities, researchers proposed a pre-inference safety gate framework to intercept unvetted inputs before model execution. The conceptual triage protocol checks patient age, biological sex, raw mass, calibrated height, resting status, and a four-point symptom screen addressing exertional chest discomfort, unexplained breathlessness, dizziness, and diagnosed cardiovascular or metabolic conditions.
The researchers emphasize that the current investigation demonstrates automated prediction of pre-existing database labels rather than clinically validated exercise suitability or physiological improvement. Because the 60,000 records comprise a sequential tabular dataset without participant identifiers, the reported cross-validation standard deviation of plus or minus 0.24 percentage points reflects internal stability across rows rather than generalization to new human populations. Controlled sensor calibration, hardware repeatability, and end-to-end latency from physical sensing to web display remain unmeasured. To advance toward clinical viability, future initiatives must conduct prospective human-in-the-loop pilot evaluations, recruiting diverse demographic cohorts to compare prototype sensor outputs against gold-standard electrocardiograms, calibrated scales, and mechanical stadiometers under standardized resting conditions. Furthermore, expanding model inputs to incorporate existing medical conditions, current activity levels, medication regimens, and user preferences will be essential. Until multi-center external validation and calibrated safety mechanisms are empirically demonstrated, AI-driven biometric recommendation engines must serve strictly as preliminary screening aids under direct clinical supervision rather than autonomous exercise prescribers.
Subject of Research: Artificial intelligence prototype for biometric exercise recommendation and its sensitivity to sensor noise
Article Title: An artificial intelligence-based prediction for suitable sport exercise recommendation using BMI and heart rate
Article References: Ntambara, B., Vincent, S., & Leopord, U. (2026). An artificial intelligence-based prediction for suitable sport exercise recommendation using BMI and heart rate. Frontiers in Big Data, 9, 1927346. https://doi.org/10.3389/fdata.2026.1927346
Image Credits: AI Generated
DOI: 10.3389/fdata.2026.1927346
Keywords: exercise recommendation, machine learning, XGBoost classifier, body mass index, resting heart rate, Internet of Things, ESP32 microcontroller, MAX30102 sensor, sensor noise sensitivity, biometric modeling, SHAP analysis, feature ablation, clinical exercise suitability, photoplethysmography, health informatics, cross-validation, pre-inference safety gate
News Source: Blake Davidson. (November 26, 2026). Machine Learning Model Predicts Exercise Categories but Falters Under Sensor Noise. Scienmag.



