scieee AI-readable full text Open interactive document viewer

A Hybrid Early Warning System Based on IoT and Machine Learning for Heart Disease Prediction

Chakraborty, Soumita; Mukherjee, Tamoghna

Abstract

The rapid development of the Internet of Things (IoT), enabled by the integration of sensors, embedded electronics, and networked software, has created new opportunities for real-time health monitoring applications. In the medical domain, IoT-based systems have gained significant attention for their ability to continuously acquire and transmit physiological parameters. This paper proposes an IoT-enabled early warning system for monitoring cardiac activity and generating alerts when abnormal heart conditions are detected. The proposed system is designed to support nursing staff by automatically notifying responsible personnel through a mobile application in the event of abnormal heart rate patterns. Data collected from multi-sensor physiological measurements are analyzed using several machine learning classification techniques to identify potential cardiac disorders. Experimental results indicate that the decision tree classifier achieves the highest accuracy of 97.08% in distinguishing abnormal cardiac conditions. Unlike existing IoT-based heart monitoring solutions, the proposed model integrates multi-sensor data acquisition, real-time GPS-based emergency tracking, and a multi-model machine learning evaluation framework validated using both UCI benchmark datasets and real sensor measurements. The results demonstrate the effectiveness of the proposed system for accurate early detection of cardiac abnormalities in clinical monitoring environments.

Full text

Journal of Integrated Engineering & Applied Sciences Volume 3, Issue 2, pp. 257-269, 2025 ISSN: 2960-2661 DOI: https://doi.org/10.5281/zenodo.18024346 Received: 24.10.2025 / Revised: 30.11.2025 / Accepted: 22.12.2025 257 A Hybrid Early Warning System Based on IoT and Machine Learning for Heart Disease Prediction Soumita Chakraborty1*, Tamoghna Mukherjee2 1 Department of Computer Science, University of Calcutta, Kolkata, India 2 Department of Computer Science and Engineering, Amity University Kolkata, India * Corresponding Author: [email protected] Abstract The rapid development of the Internet of Things (IoT), enabled by the integration of sensors, embedded electronics, and networked software, has created new opportunities for real-time health monitoring applications. In the medical domain, IoT-based systems have gained significant attention for their ability to continuously acquire and transmit physiological parameters. This paper proposes an IoT-enabled early warning system for monitoring cardiac activity and generating alerts when abnormal heart conditions are detected. The proposed system is designed to support nursing staff by automatically notifying responsible personnel through a mobile application in the event of abnormal heart rate patterns. Data collected from multi-sensor physiological measurements are analyzed using several machine learning classification techniques to identify potential cardiac disorders. Experimental results indicate that the decision tree classifier achieves the highest accuracy of 97.08% in distinguishing abnormal cardiac conditions. Unlike existing IoT-based heart monitoring solutions, the proposed model integrates multisensor data acquisition, real-time GPS-based emergency tracking, and a multi-model machine learning evaluation framework validated using both UCI benchmark datasets and real sensor measurements. The results demonstrate the effectiveness of the proposed system for accurate early detection of cardiac abnormalities in clinical monitoring environments. Keywords: IoT; Arduino; Decision Tree; Warning System; Heart Disease. 1. Introduction The pumping action of the heart generates cyclic systolic and diastolic pressures that are fundamental indicators of cardiovascular health. Systolic pressure occurs during ventricular contraction, when blood is ejected from the heart, whereas diastolic pressure corresponds to the relaxation phase between contractions, during which the heart chambers fill with blood. The frequency of these cycles is expressed as the heart rate (pulse rate). Continuous monitoring of these physiological parameters is essential for the early detection and management of cardiovascular disorders. Recent advances in sensor technology and the Internet of Things (IoT) have enabled real-time acquisition and remote monitoring of vital signs. Physiological sensors can detect blood pressure, heart rate, and body temperature and transmit the acquired data to A Hybrid Early Warning System Based on IoT and Machine Learning for Heart Disease Prediction 258 embedded platforms for electronic processing and analysis. These measurements represent primary indicators for tracking cardiac health and identifying abnormal conditions at an early stage. In this study, an IoT-based health monitoring system is proposed that integrates physiological sensing, cloud connectivity, and intelligent data analysis. The system couples’ biomedical sensors with an Arduino-based embedded platform, which continuously monitors systolic pressure, diastolic pressure, and pulse rate. The collected data are transmitted to a cloud server for further processing and analysis. In cases where abnormal heart rate patterns are detected, an alert message is automatically delivered to a mobile device. Additionally, a Global Positioning System (GPS) module is incorporated to identify the real-time location of the patient, enabling rapid emergency response. To enhance diagnostic accuracy, several machine learning (ML) techniques including k-Nearest Neighbors (KNN), Decision Tree, Support Vector Machine (SVM), Random Forest, and Logistic Regression are employed to analyze the acquired physiological data. The training dataset is obtained from the UCI Machine Learning Repository, while experimental validation is performed using real-time data collected from IoT sensors across different age groups. Among the evaluated models, the Decision Tree classifier achieved the highest prediction accuracy of 97.08%, demonstrating its effectiveness in handling both numerical and categorical medical data. Accurate classification is critical for early detection of potential cardiac events, where timely intervention can significantly reduce health risks. Although several IoT-based cardiac monitoring systems have been reported in the literature, many treat physiological sensing and machine learning-based prediction as independent components. The novelty of this work lies in the development of a unified hybrid early-warning system that seamlessly integrates continuous physiological monitoring, intelligent prediction, and real-time emergency alerting within a single deployable architecture. By combining IoT-based sensing, multi-model machine learning analysis, cloud computing, and GSM-based alerting with GPS localization, the proposed system provides a comprehensive and practical solution for real-time heart health monitoring and early warning of cardiac abnormalities 2. Literature Review One of the important applications outlined by the IoT is a continuous heart disease monitoring system. Combining powerful expert systems with vast amounts of medical data on cardiac problems may help achieve this objective. Considering this, the authors developed a system that helps patients obtain timely medical attention by exploiting the Internet of Things. By putting a finger on a pulse sensor, this method determines the user's heartbeat. This system has a segment that continuously collects heartbeat data and a section that calculates heartbeat. In this strategy, we present a technique for automatically reacting to a patient's pulse while remotely monitoring it [1]. Heart attack prognosis is a possible tool. The study uses IOT to communicate with the individual, multiple Soumita Chakraborty, Tamoghna Mukherjee 259 regressions to predict heart attacks, cloud platforms, and IOT devices to remind the individual of his risk of suffering a heart attack. The created framework could upload the collected data to a server that regularly gets updates [2]. The model must be trained in any medical expert system using a sophisticated and effective method. The article suggests the Long Short-Term Memory (LSTM) algorithm as a viable tactic in keeping with this concept. RNN is used in the proposed method to do heart disease diagnoses. To detect ailments, an IoT-Based Heart Disease Detection System uses a neural network. After RNN a neural network operation for illness diagnosis is performed based on comparisons with the training dataset [3]. Smartphones are essential to the Internet of Things. Considering this, the paper proposes a heart rate detection technique using an Android smartphone, an Arduino microcontroller, and a pulse sensor. Its foundation is the notion of using a light source and detector to track alterations in blood volume inside of our bodies. The results demonstrate that the user's heart rate is higher under unusual conditions than it is under typical conditions. The smartphone monitor will display the findings if the pulse sensor detects a dangerous heart rate scenario, and an automated warning sound will be produced [4]. Heart problems are especially common among the elderly population. A system was created utilizing machine learning techniques including Naive Bayes, XGBoost gradient classifiers, decision trees, and support vector machines (SVM). The combined Cleveland and Stalog dataset are used in the proposal. Thirteen diagnostic criteria and five environmental variables are looked at [5]. To identify significant independent predictors relating to the outcome of heart failure versus chronic ischemic heart disease, the authors used a combination of biochemical parameters in a logistic regression-based model that, on average, would excellently discriminate the outcome of heart failure versus chronic ischemic heart dis-ease in the elderly population. [6]. The article's goal was to determine if substantial left main stenosis could be predicted using a range of clinical, laboratory, and non-invasive test data as well as information on common cardiac disorders. Between April 2010 and March 2019, all adult patients in Ontario, Canada, who had stress testing before elective coronary angiography for stable ischemic heart disease were included [7]. Machine learning is one of the most well-liked categories for classification. In the proposed study, the Classification and Regression Tree (CART) approach, a super-vised machine learning technique, is used to predict heart disease and extract decision rules to elucidate correlations between input and output variables. The re-search's conclusions also list the heart disease risk factors in order of relevance [8]. The most recent data on PCI, hybrid coronary revascularization (HCR), and off-pump coronary artery bypass grafting (OPCAB) performance, indications, advantages, and limitations were reviewed. A novel decision tree that incorporates the most recent developments in minimally invasive revascularization techniques is offered to optimize the proper administration of treatment for each specific patient's demands. This data served as the basis for this decision tree, together with the knowledge discovered during Heart Team conversations [9]. Further investigation into various methodologies leads to a proposal that uses A Hybrid Early Warning System Based on IoT and Machine Learning for Heart Disease Prediction 260 OpenCL to explore how different parallelization and optimization tactics may be utilized to speed up the DCT-KNN algorithm on the FPGA parallel computing platform. According to the experimental findings, the DCT-KNN algorithm performs extremely well on the FPGA platform when compared to the conventional single-core CPU-based implementation [10]. Extreme effectiveness is a challenging feat, but the study found that the RF approach, using a heart disease dataset obtained from Kaggle three-classification based on k-nearest neighbour (KNN), decision tree (DT), and random forests (RF) algorithms, achieved 100% accuracy as well as 100% sensitivity and specificity. As a result, we discovered that a rather straightforward supervised machine learning technique may be used to predict cardiac illness quite accurately and with a large amount of potential utility [11]. The support vector machine (SVM) technique and a modified particle swarm optimization model are used in this work to build a hybrid model for the categorization of heart and liver data. The UCI machine learning library is where the data sets are obtained. Classification accuracy, error, correctness, recall, and F1 score are used to calculate the results [12]. Prior studies relied on either cloud-based sensing or ML-only prediction. Our work uniquely couples real-time data from efficient sensors with ondevice preprocessing and a GPS-enabled alert delivery system integrated with ML prediction. The contributions of this paper are as follows: • Creation of a hybrid IoT–ML early warning system that combines temperature, blood pressure, and pulse monitoring into a single embedded platform. • GPS-based location identification and real-time crisis alerts for prompt medical attention. • Mapping and validating real sensor measurements with the UCI Heart Disease dataset. • A comparative ML analysis (LR, DT, KNN, SVM) using both real sensor data and benchmark datasets, showing Decision Tree achieves superior performance. • A complete hardware–software workflow suitable for deployment in nursing homes and small clinical centres. 3. Methodology 3.1 Hardware & Software Setup The proposed system architecture is divided into two main components: the IoT-based sensing process and the machine learning–based classification process, as illustrated in Figure 1. The overall model, shown in Figure 2, integrates both hardware and software components to detect abnormalities in a patient’s heart rate, blood pressure, and body temperature within a hospital environment. When abnormal physiological conditions are detected, an alert message is automatically sent to the concerned nursing staff. Simultaneously, the patient’s location is identified using GPS latitude and longitude coordinates, enabling prompt medical intervention. This system allows a single nurse to monitor multiple patients concurrently, thereby improving efficiency and response time. Soumita Chakraborty, Tamoghna Mukherjee 261 The hardware setup consists of an Arduino Uno microcontroller, pulse sensor, blood pressure sensor, temperature sensor, GSM module, and GPS sensor. The Arduino Uno serves as the central processing unit of the system, interfacing with the sensors through its analog input ports. The sensors are placed in contact with the patient to continuously acquire physiological parameters. The measured pulse rate, blood pressure, and temperature data are transmitted to the server and displayed locally on an LCD screen. In the event of abnormal readings, an alarm mechanism is triggered, indicated by a blinking red LED. Additionally, a text message containing the patient’s vital information and GPS-based location coordinates is sent to the designated medical personnel via the GSM module. This integrated alerting mechanism ensures rapid response and enhances patient safety. Arduino coding is based on the C language. From this data we have applied a machine learning algorithm to predict heart diseases. The proposed system follows a five-stage workflow: 1. Physiological Sensing: Pulse, blood pressure, and temperature sensors continuously acquire vital signals. 2. Microcontroller Processing: The Arduino Uno does threshold-based anomaly detection and digitizes sensor outputs. 3. Cloud Communication: The GSM module uses the HTTP/REST API to upload data packets including timestamp, vitals, and device ID to a cloud server. 4. Prediction Layer: Heart disease risk is categorized by the cloud/PC-based ML engine using UCI features that are in line with actual sensor data. 5. Emergency Alerting: The device sends a real-time SMS alert with GPS information to the designated medical attendant when it detects aberrant values. Figure 1. Process Flow Diagram A Hybrid Early Warning System Based on IoT and Machine Learning for Heart Disease Prediction 262 Figure 2. Hardware architecture 3.2 Comparative study of Machine Learning approaches The data collected from the IoT device, is analysed using four different Machine Learning based classification approaches as stated below: 3.2.1 Logistic Regression It is frequently employed to calculate the likelihood that a given instance belongs to a specific class. The model predicts that the instance belongs to that class if the estimated probability is more than 50%; otherwise, it predicts that it does not. It is a binary classifier as a result [6, 14]. The relationship depicted below illustrates how the linear function is effectively used as an input to another function, such as g, in logistic regression: ℎ!(𝑥)= 𝑔(𝜃"#)(where 0≤hθ ≤1 (1) The logistic or sigmoid function, denoted by the letter g, may be expressed as follows: g(z)=11+e−z where z = θTx (2) 3.2.2 Decision Tree They are adaptable Machine Learning algorithms that can carry out tasks requiring classification, regression, and even multiple outputs. Complex datasets can be fitted by them [15]. Figure 3 describes the process flow of Decision Tree method. Figure 3. Decision Tree architecture Soumita Chakraborty, Tamoghna Mukherjee 263 3.2.3 KNN (K Nearest Neighbors) Such a technique is K-Nearest Neighbours (kNN), which although being straight forward, nonetheless works rather well for big training sets. It is based solely on the fundamental principle of every prediction, which holds that observations with simi-lar features will often provide outputs that are similar. The plurality or mean of an observation's k "Nearest Neighbours" in the training set, which is frequently weighted, is used by Nearest Neighbour approaches to predict the value of a new observation. Any observation, given an infinite amount of data, will have many "neighbours" that are arbitrarily close with respect to all measured characteristics, and the variability of their results will provide the most accurate prediction possible, barring a model that is entirely and accurately specified [16]. 3.2.4 SVM (Support Vector Machine) Finding a hyperplane in an N-dimensional space (N is the number of features) that clearly classifies the data points is the goal of the SVM. There are a variety of different hyperplanes that might be used to split the two classes of data points. Finding a plane with the largest margin that is, the largest space between data points for both classes is the goal. Maximising the margin distance adds some support, increasing the confidence with which future data points may be categorized [17]. 3.2.4.1 Variables Description We have considered the following data variables as applicable for our proposed system. Age – Age of the subject Sex – Gender of the subject cp – Type of chest discomfort trestbps - Subject’s resting heart rate pulse – Subject’s pulse rate thalach - Subject’s attainment of the highest heart rate exang - Angina brought on by exercise 3.2.4.2 Classification Algorithm We have seen through our study of various literatures that Logistic Regression, Decision Tree, KNN and SVM are the most popular classification algorithms used in different studies. Hence, we carried out a comparative analysis of the four algorithms. The detailed process is as follows: a. Data Import from CSV File b. Arrangement of the classes c. Choosing undesirable columns d. Delete unnecessary columns e. Split the data into Train and Test datasets. f. Modelling (Logistic Regression, Decision Tree, KNN and SVM) A Hybrid Early Warning System Based on IoT and Machine Learning for Heart Disease Prediction 264 g. Analyzing prophecies 4. Results and Discussion The total hardware set up has been shown in the above figures (Figure 4 until Figure 9). Temperature, pulse sensor and blood pressure sensor relate to analog input of the Arduino uno. The GSM module relates to transmitter, receiver and ground pin. The vcc pin of the GSM module is connected to the 5-volt supply, and the transmitter pin of the GPS module is connected to one of the digital pins. When the temperature, pulse and blood pressure exceed normal rated value the LED will blink, value is displayed in the LCD screen, and the text message is sent to the mobile number which has been mentioned in the coding, and the position coordinate of the actor is mentioned in the text message. To correctly predict heart disease probability, based on information gathered from five factors utilizing IoT-based sensors, the Decision Tree classification technique for identifying heart diseases achieved an accuracy of 97.08%. Results obtained from accuracy test are shown in Table 1. Figure 4. Patient’s location displayed on LCD Figure 5. SMS sending using GSM module Soumita Chakraborty, Tamoghna Mukherjee 265 Figure 6. Location data send to specified mobile number Figure 7. Patient’s information as recorded on Blood Pressure sensor Figure 8. Continuous pulse rate display