Submitted:
17 September 2025
Posted:
18 September 2025
You are already at the latest version
Abstract

Keywords:
1. Introduction
2. Materials and Methods
2.1. Dataset and Data Preprocessing
2.2. Data Recording and Analysis
2.3. Incentive Spirometer
- Measurement range: 0-5000 ml (±3% accuracy)
- Volume display: Milliliter-based scale reading with a transparent cylindrical chamber
- Flow rate measurement: 100-1200 ml/s
- Integration of a disposable mouthpiece and bacterial filter
- Mechanical feedback system: Movable marker for patients to visually monitor the target volume [19].
- Volume accuracy: 98.2% correlation (p < 0.01) in the 500-5000 ml range
- Repeatability: ±1.8% CV (Coefficient of Variation) in 20 measurements
- Clinical validation: 0.95 ICC (Intraclass Correlation) agreement with a standard spirometer in a comparative study on 50 patients [19].
2.4. Image Processing
2.5. Logistic Regression
2.6. Support Vector Regression
2.7. Random Forest Regressor
2.8. XGBoost
2.9. Gradient Boosting
2.10. K-Nearest Neighbor
3. Results
4. Discussion
- The dataset on which the machine learning models were trained consisted of simulated patient data. A larger and more diverse dataset collected from a real patient population would further strengthen the generalizability and clinical validity of the models.
- The performance of the image processing algorithm may be affected by low-light conditions or camera shake. Future studies could address this limitation by integrating more robust deep learning-based object detection models (e.g., YOLO, SSD). Ultimately, randomized controlled trials are necessary to assess the long-term clinical effectiveness of the system [14].
- This study did not extensively address data security and privacy concerns, which are paramount for any system handling patient health information. While the current prototype stores data locally, a deployable system must incorporate robust encryption for data at rest and in transit, comply with regulations such as GDPR or HIPAA, and implement secure user authentication protocols. These features are essential for clinical adoption and will be a core focus of future development.
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| LR | Linear Regression |
| SVR | Support Vector Regression |
| LGBM | Light Gradient Boosting Machine |
| RFR | Random Forest Regressor |
| KNN | K Nearest Neighbors |
References
- Postolache, P.; Săndulache, Ștefan; Ghimuș, C.; Nechifor, A. Assessment of Exercise Capacity: A Key Element in Pulmonary Rehabilitation. In; 2022 ISBN 978-1-80356-239-1.
- Sietsema, K.E.; Rossiter, H.B. Exercise Physiology and Cardiopulmonary Exercise Testing. Seminars in Respiratory and Critical Care Medicine 2023, 44, 661–680. [Google Scholar] [CrossRef]
- Kotta, P.A.; Ali, J.M. Incentive Spirometry for Prevention of Postoperative Pulmonary Complications After Thoracic Surgery. Respir Care 2021, 66, 327–333. [Google Scholar] [CrossRef]
- Topçu, S.Y. Hastaların solunum egzersizi uygulamalarını etkileyen faktörler ve hemşirelerin rolü. İzmir Göğüs Dergisi 2016, 30, 89–96. [Google Scholar]
- Agostini, P.; Singh, S. Incentive Spirometry Following Thoracic Surgery: What Should We Be Doing? Physiotherapy 2009, 95, 76–82. [Google Scholar] [CrossRef] [PubMed]
- Odor, P.M.; Bampoe, S.; Gilhooly, D.; Creagh-Brown, B.; Moonesinghe, S.R. Perioperative Interventions for Prevention of Postoperative Pulmonary Complications: Systematic Review and Meta-Analysis. BMJ 2020, 368, m540. [Google Scholar] [CrossRef] [PubMed]
- Sullivan, K.A.; Churchill, I.F.; Hylton, D.A.; Hanna, W.C. Use of Incentive Spirometry in Adults Following Cardiac, Thoracic, and Upper Abdominal Surgery to Prevent Post-Operative Pulmonary Complications: A Systematic Review and Meta-Analysis. Respiration 2021, 100, 1114–1127. [Google Scholar] [CrossRef] [PubMed]
- Özcan İlçe, A.; Alpteker, H.; Yüksel, S.; yiğit, Ü.; Yorgun, S.; KILIÇGÜN, ali; GÜLER, S. Kliniklerde İnsentif Spirometre Kullanılıyor Mu?; 2013; Vol. 21.
- Gupta, S.; Modgil, S.; Bhattacharyya, S.; Bose, I. Artificial Intelligence for Decision Support Systems in the Field of Operations Research: Review and Future Scope of Research. Ann Oper Res 2022, 308, 215–274. [Google Scholar] [CrossRef]
- Al-Anazi, S.; Al-Omari, A.; Alanazi, S.; Marar, A.; Asad, M.; Alawaji, F.; Alwateid, S. Artificial Intelligence in Respiratory Care: Current Scenario and Future Perspective. Ann Thorac Med 2024, 19, 117–130. [Google Scholar] [CrossRef]
- Zhang, Y.; Wang, Y. Recent Trends of Machine Learning Applied to Multi-Source Data of Medicinal Plants. Journal of Pharmaceutical Analysis 2023, 13, 1388–1407. [Google Scholar] [CrossRef]
- Debon, R.; Coleone, J.; Bellei, E.; Bertoletti De Marchi, A. Mobile Health Applications for Chronic Diseases: A Systematic Review of Features for Lifestyle Improvement. Diabetes and Metabolic Syndrome Clinical Research and Reviews 2019, 13, 2507–2512. [Google Scholar] [CrossRef]
- Shi, Z.; Chow, C.W.K.; Fabris, R.; Liu, J.; Jin, B. Applications of Online UV-Vis Spectrophotometer for Drinking Water Quality Monitoring and Process Control: A Review. Sensors 2022, 22, 2987. [Google Scholar] [CrossRef]
- Viswanath, V.; Garrison, J.; Patel, S. SpiroConfidence: Determining the Validity of Smartphone Based Spirometry Using Machine Learning. Annu Int Conf IEEE Eng Med Biol Soc 2018, 2018, 5499–5502. [Google Scholar] [CrossRef] [PubMed]
- Burns, M.L.; Sinha, A.; Hoffmann, A.; Wu, Z.; Medina Inchauste, T.; Retsky, A.; Chesney, D.; Kheterpal, S.; Shah, N. Development and Testing of a Data Capture Device for Use With Clinical Incentive Spirometers: Testing and Usability Study. JMIR Biomed Eng 2023, 8, e46653. [Google Scholar] [CrossRef] [PubMed]
- Karthika, M.; Sreedharan, J.K.; Shevade, M.; Mathew, C.S.; Ray, S. Artificial Intelligence in Respiratory Care. Front Digit Health 2024, 6, 1502434. [Google Scholar] [CrossRef] [PubMed]
- Qyrana, M.; Figini, S. Feature Selection and Multicollinearity in Supervised Models. Advances and Applications in Statistics 2020, 65, 151–164. [Google Scholar] [CrossRef]
- Liu, L.; Perez-Concha, O.; Nguyen, A.; Bennett, V.; Jorm, L. De-Identifying Australian Hospital Discharge Summaries: An End-to-End Framework Using Ensemble of Deep Learning Models. Journal of Biomedical Informatics 2022, 135, 104215. [Google Scholar] [CrossRef]
- Bıçakcılar. Available online: https://kocmedical.com/Products/ProductDetail/8b2666eb-1d11-447a-b937-6932fb8d858d (accessed on 27 August 2025).
- Bradski, G. The Opencv Library; 2000; Vol. 25.
- Szeliski, R. Computer Vision: Algorithms and Applications; Springer Nature, 2022; ISBN 978-3-030-34372-9.
- Sonka, M.; Hlavac, V.; Boyle, R. Image Processing, Analysis and and Machine Vision (3. Ed.).; 2008; ISBN 978-0-495-24438-7.
- OpenCV: OpenCV Modules. Available online: https://docs.opencv.org/4.7.0/ (accessed on 27 August 2025).
- Bouguet, J. Pyramidal Implementation of the Lucas Kanade Feature Tracker.; 1999.
- Hartley, R.; Zisserman, A. Multiple View Geometry in Computer Vision; 2nd ed.; Cambridge University Press: Cambridge, 2004; ISBN 978-0-521-54051-3.
- Intel Corporation. Available online: https://www.intel.com/content/www/us/en/docs/gpa/cookbook/2022-4/intel-graphics-optimization.html (accessed on 27 August 2025).
- Martin Bland, J.; Altman, DouglasG. Statistical Methods for Assessing Agreement between Two Methods of Clinical Measurement. The Lancet 1986, 327, 307–310. [Google Scholar] [CrossRef]
- Hosmer, D.W.; Lemeshow, S.; Sturdivant, R.X. Applied Logistic Regression. John Wiley & Sons, Inc. 2013. [CrossRef]
- Luo, M.; Liu, M.; Zhang, S.; Gao, J.; Zhang, X.; Li, R.; Lin, X.; Wang, S. Mining Soil Heavy Metal Inversion Based on Levy Flight Cauchy Gaussian Perturbation Sparrow Search Algorithm Support Vector Regression (LSSA-SVR). Ecotoxicology and Environmental Safety 2024, 287, 117295. [Google Scholar] [CrossRef]
- Xiong, L.; An, J.; Hou, Y.; Hu, C.; Wang, H.; Chen, Y.; Tang, X. Improved Support Vector Regression Recursive Feature Elimination Based on Intragroup Representative Feature Sampling (IRFS-SVR-RFE) for Processing Correlated Gas Sensor Data. Sensors and Actuators B: Chemical 2024, 419, 136395. [Google Scholar] [CrossRef]
- Sánchez, J.C.M.; Mesa, H.G.A.; Espinosa, A.T.; Castilla, S.R.; Lamont, F.G. Improving Wheat Yield Prediction through Variable Selection Using Support Vector Regression, Random Forest, and Extreme Gradient Boosting. Smart Agricultural Technology 2025, 10, 100791. [Google Scholar] [CrossRef]
- Ramos Collin, B.R.; de Lima Alves Xavier, D.; Amaral, T.M.; Castro Silva, A.C.G.; dos Santos Costa, D.; Amaral, F.M.; Oliva, J.T. Random Forest Regressor Applied in Prediction of Percentages of Calibers in Mango Production. Information Processing in Agriculture 2024. [Google Scholar] [CrossRef]
- EL Bilali, A.; Hadri, A.; Taleb, A.; Tanarhte, M.; EL Khalki, E.M.; Kharrou, M.H. A Novel Hybrid Modeling Approach Based on Empirical Methods, PSO, XGBoost, and Multiple GCMs for Forecasting Long-Term Reference Evapotranspiration in a Data Scarce-Area. Computers and Electronics in Agriculture 2025, 232, 110106. [Google Scholar] [CrossRef]
- Cheng, T.; Yao, C.; Duan, J.; He, C.; Xu, H.; Yang, W.; Yan, Q. Prediction of Active Length of Pipes and Tunnels under Normal Faulting with XGBoost Integrating a Complexity-Performance Balanced Optimization Approach. Computers and Geotechnics 2025, 179, 107048. [Google Scholar] [CrossRef]
- Alsulamy, S. Predicting Construction Delay Risks in Saudi Arabian Projects: A Comparative Analysis of CatBoost, XGBoost, and LGBM. Expert Systems with Applications 2025, 268, 126268. [Google Scholar] [CrossRef]
- Abushandi, E. Water Quality Assessment and Forecasting Along the Liffey and Andarax Rivers by Artificial Neural Network Techniques Toward Sustainable Water Resources Management. Water 2025, 17, 453. [Google Scholar] [CrossRef]
- Carayon, P.; Wetterneck, T.B.; Rivera-Rodriguez, A.J.; Hundt, A.S.; Hoonakker, P.; Holden, R.; Gurses, A.P. Human Factors Systems Approach to Healthcare Quality and Patient Safety. Appl Ergon 2014, 45, 14–25. [Google Scholar] [CrossRef]
- Vincent, C.J.; Niezen, G.; O’Kane, A.A.; Stawarz, K. Can Standards and Regulations Keep up with Health Technology? JMIR Mhealth Uhealth 2015, 3, e64. [Google Scholar] [CrossRef]
- Chittaro, L.; Sioni, R. Evaluating Mobile Apps for Breathing Training: The Effectiveness of Visualization. Computers in Human Behavior 2014, 40, 56–63. [Google Scholar] [CrossRef]











| Researchers | Technology Used | Data Source | Advantage | Limitation | Contribution to this Study |
|---|---|---|---|---|---|
| [14] | Smartphone + ML | Real patient data | Portability | Low sensor accuracy | Camera-based low-cost alternative |
| [15] | Digital spirometer + data log | Clinical test | User-friendly | Additional hardware cost | Software-based solution without extra device |
| [10] | AI-supported monitoring | Clinical observation | Clinical decision support | High cost | Adds patient compliance + clinical support |
| This Study | Tablet camera + ML + image processing | 250 scenario-based patients | Low cost, high accuracy, real-time monitoring | Lack of real patient dataset | Usable in both hospital and home environments |
| Variable | Type | Mean ± Standard Deviations | Range (Min–Max) | Median | Skewness (Distribution) | Count (n) / Percentage (%) |
|---|---|---|---|---|---|---|
| Age | Continuous | 55.04± 24.26 | 12–94 | 57.00 | -0.16 (near normal, slight left skew) | - |
| Spirometry30sec (ml) | Continuous | 2562.80 ± 763.90 | 200–3500 | 2500.00 | -0.43 (slight left skew) | - |
| Spirometry60sec (ml) | Continuous | 2498.00 ± 808.46 | 500–3500 | 2500.00 | -0.46 (slight left skew) | - |
| Spirometry90sec (ml) | Continuous | 2404.00 ± 800.84 | 500–3500 | 2500.00 | -0.45 (slight left skew) | - |
| Spirometry120sec (ml) | Continuous | 2208.00 ± 809.54 | 500–3500 | 2500.00 | -0.31 (near normal, slight left skew) | - |
| Average Spirometry (ml) | Continuous | 2420.20 ± 638.73 | 1000–3500 | 2500.00 | -0.23 (near normal) | - |
| Disease | Categorical | - | - | - | - | Internal medicine adult: 48 (19.2%) Surgery adult: 48 (19.2%) Surgery elderly: 44 (17.6%) Internal medicine elderly: 40 (16.0%) Internal medicine young: 38 (15.2%) Surgery young: 32 (12.8%) |
| Smoking | Categorical | - | - | - | - | No: 163 (65.2%) Yes: 87 (34.8%) |
| Class | Categorical | - | - | - | - | Beautiful: 159 (63.6%) Perfect: 90 (36.0%) Low: 1 (0.4%) |
| Model | Accuracy | R2 | MSE | RMSE | MAE |
|---|---|---|---|---|---|
| Random Forest | 100% | 1 | 0 | 0 | 0 |
| SVM | 86% | 0.3333 | 0.5600 | 0.7483 | 0.2800 |
| Logistic Regression | 82% | 0.2143 | 0.6600 | 0.8124 | 0.3400 |
| XGBoost | 100% | 1 | 0 | 0 | 0 |
| KNN | 90% | 0.5238 | 0.4000 | 0.6325 | 0.2000 |
| Gradient Boosting | 100% | 1 | 0 | 0 | 0 |
| Model | Accuracy (%) | Precision | Recall | F1-Score | R2 | p-value (Baseline) |
|---|---|---|---|---|---|---|
| RFR | 100.0 | 1.00 | 1.00 | 1.00 | 1.0 | < 0.001* |
| XGBoost | 100.0 | 1.00 | 1.00 | 1.00 | 1.0 | < 0.001* |
| GB | 100.0 | 1.00 | 1.00 | 1.00 | 1.0 | < 0.001* |
| KNN | 90.0 | 0.91 | 0.90 | 0.90 | 0.52 | 0.003* |
| SVM | 86.0 | 0.87 | 0.86 | 0.86 | 0.33 | 0.012* |
| LR | 82.0 | 0.83 | 0.82 | 0.82 | 0.21 | 0.028* |
| Baseline | 33.3 | 0.11 | 0.33 | 0.17 | -0.01 | - |
| Model | Mean CV Accuracy (%) | Std. Deviation of CV Accuracy | Min CV Accuracy (%) | Max CV Accuracy (%) |
| RFR | 99.8 | 0.4 | 99.0 | 100.0 |
| XGBoost | 99.6 | 0.6 | 98.5 | 100.0 |
| GB | 99.4 | 0.8 | 98.0 | 100.0 |
| KNN | 89.1 | 2.5 | 85.0 | 93.0 |
| SVM | 84.8 | 3.2 | 80.0 | 89.0 |
| LR | 80.5 | 3.8 | 75.0 | 86.0 |
| Model | Predicted Class | Confidence/Notes |
|---|---|---|
| Random Forest | Beautiful | High consistency |
| SVM | Beautiful | Moderate confidence |
| Logistic Regression | Perfect | Outlier prediction |
| XGBoost | Beautiful | High consistency |
| KNN | Beautiful | High consistency |
| Gradient Boosting | Beautiful | High consistency |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).