Cardiovascular disease remains a serious global health problem, and the frustrating part is that most people don\'t find out they have an issue until a doctor\'s appointment — which, let\'s be honest, doesn\'t happen as often as it should. That gap between what\'s going on inside someone\'s body and when they actually find out about it is what pushed us to build CardioSense.
The basic idea was to use a smartwatch to keep an eye on heart activity continuously, rather than waiting for those occasional check-ups. We paired that data collection with a machine learning pipeline and a web dashboard so users could see their cardiovascular risk in something close to real time. To do this, we ended up using three models working together — an Isolation Forest to catch unusual heart rate patterns as they happen, an XGBoost model to estimate an overall risk score, and a Random Forest to give a probability estimate for actual heart disease.
We tested the system against a couple of representative patient profiles and some simulated heart rate streams. The results were mostly what we\'d hoped for — a higher-risk profile triggered elevated scores and warnings, while a low-risk profile stayed comfortably in the normal range. The Random Forest turned out to be the strongest performer, hitting 90.16% accuracy with a ROC-AUC of 0.957. The other two models held up reasonably well too.
Under the hood, the system runs on a PostgreSQL database, a Flask backend for the ML side, and a React frontend for the dashboard. Data flows from the watch to the screen in real time. We think something like CardioSense could work well as an early-warning tool — though we\'re realistic that it would need proper clinical validation before anyone should rely on it for medical decisions.
Introduction
The project “CardioSense” presents a wearable-based cardiovascular monitoring system that uses smartwatch data and machine learning to enable early detection of heart-related risks. It is motivated by the high global death rate from cardiovascular diseases and the limitations of traditional healthcare systems, which rely on infrequent, snapshot-based check-ups rather than continuous monitoring.
The system collects real-time heart rate data from a Samsung Galaxy Watch using a PPG sensor and transmits it to a backend system for processing. It combines a Node.js backend for user management with a Flask-based machine learning service. Data is stored in PostgreSQL and analyzed using three models: Isolation Forest for anomaly detection, XGBoost for risk scoring, and Random Forest for disease prediction. A React-based dashboard displays real-time heart rate trends, risk levels, and alerts in an easy-to-understand interface.
The methodology includes feature engineering from clinical and lifestyle data, along with rolling statistical analysis of heart rate streams to reduce noise. The system uses a hybrid risk scoring approach that combines machine learning predictions with rule-based adjustments for clinically important factors like hypertension, smoking, and prior heart attacks. Real-time alerts are triggered for abnormal heart rates or anomaly detection results.
Experimental results show that the system can successfully distinguish between high-risk and low-risk patients. It also detects abnormal heart rate patterns in real time and generates alerts accordingly. Among the models, Random Forest performs best (90.16% accuracy, 96.43% sensitivity), while Isolation Forest shows comparatively lower sensitivity, indicating missed anomalies in some cases.
Conclusion
CardioSense can be seen as an early-stage system for continuous cardiovascular monitoring using wearable devices and machine learning. By combining smartwatch data with multiple models and a real-time dashboard, it is able to separate higher-risk and lower-risk profiles in a reasonably consistent way.
That said, the results should be taken with some caution. The dataset we worked with is relatively small, and parts of the input depend on self-reported information, which isn\'t always perfectly reliable. The anomaly detection model also misses certain patterns at times, so there\'s clearly room to improve how it behaves.
Even with those limitations, the system shows that building an end-to-end monitoring pipeline using widely available tools is quite feasible. Whether something like this can move beyond a prototype really depends on further testing, better-quality data, and validation in real-world conditions. For now, it\'s best treated as a step in that direction rather than a complete solution.
References
[1] X. Chen and L. Wu, \"AI-driven health dashboards for clinical decision support,\" J. Med. Inform., vol. 12, no. 3, pp. 45–58, 2022.
[2] P. Rao and R. Mehta, \"IoT-based health monitoring with wearables and visual analytics,\" IEEE IoT J., vol. 9, no. 7, pp. 1234–1245, 2021.
[3] A. Kumar, S. Sharma, and N. Patel, \"Comparative analysis of deep learning methods for cardiac anomaly detection,\" Comput. Biol. Med., vol. 150, p. 106153, 2022.
[4] S. Sharma and R. Patel, \"Securing distributed IoT health architectures with JWT authentication,\" IEEE Trans. Netw. Serv. Manag., vol. 18, no. 4, pp. 789–800, 2021.
[5] G. B. Moody and R. G. Mark, \"The impact of the MIT-BIH Arrhythmia Database,\" IEEE Eng. Med. Biol. Mag., vol. 20, no. 3, pp. 45–50, 2001.
[6] UCI Machine Learning Repository, Heart Disease Dataset, 1988. [Online]. Available: https://archive.ics.uci.edu/ml/datasets/heart+Disease
[7] F. T. Liu, K. M. Ting, and Z. H. Zhou, \"Isolation forest,\" in Proc. 8th IEEE Int. Conf. Data Mining, 2008, pp. 413–422.
[8] T. Chen and C. Guestrin, \"XGBoost: A scalable tree boosting system,\" in Proc. 22nd ACM SIGKDD Int. Conf. Knowledge Discovery Data Mining, 2016, pp. 785–794.
[9] L. Breiman, \"Random forests,\" Mach. Learn., vol. 45, no. 1, pp. 5–32, 2001.